![]() |
Page History
...
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
Install PIP
.Multiexcerpt include nopanel true MultiExcerptName ExitDisclaimer PageWithExcerpt wikicontent:Exit Disclaimer to Include Code Block sudo apt-get install python-pip
Install virtualenv.
sudoCode Block sudo apt-get install python-virtualenv
Install Git
.Multiexcerpt include nopanel true MultiExcerptName ExitDisclaimer PageWithExcerpt wikicontent:Exit Disclaimer to Include Code Block sudo apt-get install git
Install the prerequisites for MySQL-Python
.Multiexcerpt include nopanel true MultiExcerptName ExitDisclaimer PageWithExcerpt wikicontent:Exit Disclaimer to Include Code Block sudo apt-get install build-essential python-dev libmysqlclient-dev
Create Storage Containers
...
Install azure-cli
.Multiexcerpt include nopanel true MultiExcerptName ExitDisclaimer PageWithExcerpt wikicontent: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
. 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.Multiexcerpt include nopanel true MultiExcerptName ExitDisclaimer PageWithExcerpt wikicontent:Exit Disclaimer to Include From command line
azure sb namespace create <name> <location>
where<location>
can be "East US"- Log on to the Azure Portal
.Multiexcerpt include nopanel true MultiExcerptName ExitDisclaimer PageWithExcerpt wikicontent:Exit Disclaimer to Include - In the left pane, click Service Bus.
- Select the service bus you just created.
- At the top of the screen click Queues.
- Click Create a new queue.
- Click Quick Create and create a new queue named "compute".
- Click Create A New Queue.
- At the bottom of the screen, click New, and create another queue named "response".
- In the left pane, click Service Bus.
- At the bottom of the page, click Connection Information.
- Copy the following connection information:
- Namespace name
- Default issuer
- Default key
...
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
Clone the CodaLab repository:
Code Block git clone https://github.com/codalab/codalab-cli cd codalab-cli
Run the setup script (will install things into a Python virtual environment):
Code Block ./setup.sh
Set your path to include CodaLab (add this line to your
.bashrc
):Code Block export PATH=$PATH:<path to codalab-cli>/codalab/bin
Optional: include some handy macros (add this line to your
.bashrc
):Code Block . <path to codalab-cli>/rc
Install CodaLab
the CodaLab repoMultiexcerpt include nopanel true MultiExcerptName ExitDisclaimer PageWithExcerpt wikicontent:Exit Disclaimer to Include
from GitHub.Multiexcerpt include nopanel true MultiExcerptName ExitDisclaimer PageWithExcerpt wikicontent:Exit Disclaimer to Include Clone your fork:
Code Block git clone https://github.com/<username>/codalab.git
For more details and recommended practices, see Developer Guidelines
Multiexcerpt include | ||||||
---|---|---|---|---|---|---|
|
...
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
. Before runningMultiexcerpt include nopanel true MultiExcerptName ExitDisclaimer PageWithExcerpt wikicontent:Exit Disclaimer to Include 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
Activate the virtual environment.
Windows
venv\Scripts\activate
Linux
source venv/bin/activate
...