NIH | National Cancer Institute | NCI Wiki  

WIKI MAINTENANCE NOTICE

Please be advised that NCI Wiki will be will be undergoing maintenance on Monday, June 24th between 1000 ET and 1100 ET.
Wiki will remain available, but users may experience screen refreshes or HTTP 502 errors during the maintenance period. If you encounter these errors, wait 1-2 minutes, then refresh your page.

If you have any questions or concerns, please contact the CBIIT Atlassian Management Team.

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Install Python 2.7. For current Debian-based Linux distributions (such as Ubuntu), BSD and Mac Python 2.7 is usually installed. However Redhat-based Linux distributions, such as RHEL and CentOS, are sometimes behind the curve and do not have Python 2.7. As of this writing, CentOS 6.4 is at Python 2.6, which is well on its way to EOL. Python 2.6 may work, but code will be written with 2.7 and 3.3+ in mind. Below are instructions for Ubuntu Linux 13.04+.

    Code Block
    sudo apt-get install python2.7 python2.7-dev python-virtualenv
  2. Install PIP

    Multiexcerpt include
    nopaneltrue
    MultiExcerptNameExitDisclaimer
    PageWithExcerptwikicontent:Exit Disclaimer to Include
    .

    Code Block
    sudo apt-get install python-pip
  3. Install virtualenv.

    Code Block
    sudo
     sudo apt-get install python-virtualenv
  4. Install Git

    Multiexcerpt include
    nopaneltrue
    MultiExcerptNameExitDisclaimer
    PageWithExcerptwikicontent:Exit Disclaimer to Include
    .

    Code Block
    sudo apt-get install git
  5. Install the prerequisites for MySQL-Python

    Multiexcerpt include
    nopaneltrue
    MultiExcerptNameExitDisclaimer
    PageWithExcerptwikicontent:Exit Disclaimer to Include
    .

    Code Block
    sudo apt-get install build-essential python-dev libmysqlclient-dev

Create Storage Containers

...

  1. Install azure-cli

    Multiexcerpt include
    nopaneltrue
    MultiExcerptNameExitDisclaimer
    PageWithExcerptwikicontent:Exit Disclaimer to Include
    .

    In Ubuntu it can be installed using the following command:

    Code Block
     sudo apt-get install nodejs-legacy
     sudo apt-get install npm
     sudo npm install -g azure-cli

    To login run the following command:

    Code Block
    azure login

    Copy the code offered to you, above, and open a browser to http://aka.ms/devicelogin

    Multiexcerpt include
    nopaneltrue
    MultiExcerptNameExitDisclaimer
    PageWithExcerptwikicontent:Exit Disclaimer to Include
    . Enter the code, and then you are prompted to enter the username and password for the identity you want to use. When that process completes, the command shell completes the log in process.

  2. From command line azure sb namespace create <name> <location> where <location> can be "East US"

  3. Log on to the Azure Portal
    Multiexcerpt include
    nopaneltrue
    MultiExcerptNameExitDisclaimer
    PageWithExcerptwikicontent:Exit Disclaimer to Include
    .
  4. In the left pane, click Service Bus.
  5. Select the service bus you just created.
  6. At the top of the screen click Queues.
  7. Click Create a new queue.
  8. Click Quick Create and create a new queue named "compute".
  9. Click Create A New Queue.
  10. At the bottom of the screen, click New, and create another queue named "response".
  11. In the left pane, click Service Bus.
  12. At the bottom of the page, click Connection Information.
  13. Copy the following connection information:
    • Namespace name
    • Default issuer
    • Default key

...

  1. Make sure you have the dependencies (Python 2.7 and virtualenv). If you're running Ubuntu:

    Code Block
    sudo apt-get install python2.7 python2.7-dev python-virtualenv
  2. Clone the CodaLab repository:

    Code Block
       
    git clone https://github.com/codalab/codalab-cli
    cd codalab-cli
  3. Run the setup script (will install things into a Python virtual environment):

    Code Block
      
    ./setup.sh
  4. Set your path to include CodaLab (add this line to your .bashrc):

    Code Block
    export PATH=$PATH:<path to codalab-cli>/codalab/bin
  5. Optional: include some handy macros (add this line to your .bashrc):

    Code Block
    . <path to codalab-cli>/rc

Install CodaLab

  1. Fork

    Multiexcerpt include
    nopaneltrue
    MultiExcerptNameExitDisclaimer
    PageWithExcerptwikicontent:Exit Disclaimer to Include
    the CodaLab repo
    Multiexcerpt include
    nopaneltrue
    MultiExcerptNameExitDisclaimer
    PageWithExcerptwikicontent:Exit Disclaimer to Include
    from GitHub.

  2. Clone your fork:

    Code Block
    git clone https://github.com/<username>/codalab.git

For more details and recommended practices, see Developer Guidelines

Multiexcerpt include
nopaneltrue
MultiExcerptNameExitDisclaimer
PageWithExcerptwikicontent:Exit Disclaimer to Include
.

...

  1. Run the dev_setup script.

    Windows

     

    Code Block
          cd codalab
    .\dev_setup.bat

    If you are going to use SQL Server as a database, you will need to install the Python PyODBC library

    Multiexcerpt include
    nopaneltrue
    MultiExcerptNameExitDisclaimer
    PageWithExcerptwikicontent:Exit Disclaimer to Include
    . Before running dev_setup, you can download the installer, then run the setup script as follows (assuming the installer was downloaded at the root of a D drive):

    Code Block
          cd codalab
    dev_setup.bat D:\pyodbc-3.0.7.win-amd64-py2.7.exe

    Linux

     

    Code Block
         
    cd codalab
    source ./dev_setup.sh
  2. Activate the virtual environment.

    Windows

          venv\Scripts\activate
    
        

    Linux

          source venv/bin/activate
    

...