Deploy to codalab.stanford.edu
¶
The codalab.stanford.edu
instance is used by the NLP group.
You can see the status of the NLP machines here.
The goal is to put CodaLab onto codalab.stanford.edu
. BE CAREFUL, AS THIS
AFFECTS the REAL SYSTEM! Take each step cautiously and double check logs to
see that there are no error messages before proceeding. DO NOT DELETE ANY FILES
on this host.
In order to avoid using Network File System (NFS) with MySQL, the MySQL volumes are stored at /home/codalab
with a
symlink from /juice/u/codalab/codalab-worksheets/var/codalab/mysql
to /home/codalab/mysql
. See
Using NFS with MySQL for more information.
Note that Python3.6 and Docker environment variables are pre-configured on this host.
To deploy:¶
- If you do not have an NLP account, see here.
-
Log in to one of the public nodes (doesn't matter which):
ssh your_csid@[jacob/jamie].stanford.edu
-
Log on to codalab.stanford.edu. The password can be found here:
ssh codalab@codalab.stanford.edu
-
Move to the project directory:
cd /nlp/u/codalab/codalab-worksheets
-
Activate the virtual environment:
source ./venv/bin/activate
-
Stop the server:
python3 codalab_service.py stop
-
Ensure that you are on the
stanford
branch. Pull the latest code changes from the most recent release tag:git pull origin <newly_released_version e.g. v0.5.22>
-
Install the server dependencies into the codalab conda environment:
/u/nlp/anaconda/main/anaconda3/envs/default-py37/bin/python3 -m pip install -r requirements-server.txt
-
Get the latest version of start-stanford.sh from the deployment repository. Do not edit the script directly.
-
Restart the services, specifying the version of CodaLab to use:
CODALAB_VERSION=v0.5.22 ./start-stanford.sh
The command above will start
codalab.stanford.edu
in protected mode. To give verified users access, see the documentation here. -
After deploying the latest version, update the CLI version for the NLP cluster:
-
Log on to sc:
ssh sc
-
Update the CodaLab CLI version for the
default-py37
conda environment:/u/nlp/anaconda/main/anaconda3/envs/default-py37/bin/pip install codalab --upgrade
-
To verify codalab.stanford.edu is up and running:¶
-
Verify all services are up and running correctly (should be the same as local testing) on
codalab.stanford.edu
. -
Try to connect a NLP worker to
codalab.stanford.edu
and test the site:-
Open another terminal session and log in to one of the public nodes again:
ssh your_csid@[jacob/jamie].stanford.edu
-
Log on to sc:
ssh sc
-
If needed, add
/u/nlp/bin/cl
to your path:echo 'export PATH="/u/nlp/bin/:$PATH"' >> ~/.bashrc
-
Spawn a nlp run to any one of the cluster nodes:
nlprun -c 1 -g 0 --memory 5g
-
Start a CodaLab worker that connects to the
codalab.stanford.edu
instance:nlp-cl-worker --tag=test --server=https://codalab.stanford.edu
-
Manually create some jobs to run on the above tagged worker
-
-
If everything goes well, Slack other team members and celebrate!
To gain access to the Stanford NLP machines:¶
-
Request for an account here.
-
For “Client Group”, select "CS - NLP".
-
For the “Sponsor”, select "Percy Liang".
-
For “Subject”, type "Request to get an NLP Account".
-
For “Description”, write a short description as to why you need an NLP account. Mention you need Docker access.
I am a member of the CodaLab team and I need access to the NLP account to run CodaLab. I also need access to Docker in order to interact with CodaLab.
-
-
Concurrently, request for a CSID here, as you will be asked to create one if you haven’t already during the approval process.
-
Once your request has been approved and your account has been created, use your CSID credentials to make sure you are able to access the machines.
ssh your_csid@[jacob / jamie].stanford.edu ssh sc
Troubleshooting¶
If you receive an unexpected error when trying to deploy, and if you think it might be due to the server configuration itself (rather than something with CodaLab), submit a ticket using this form: https://support.cs.stanford.edu/hc/en-us/requests/new and include the error message you are seeing.
Deploy to cs324.codalab.org
¶
Replace "v1.4.3" with the version you want to deploy.
- Update the cs324 branch. From your local computer, run:
git fetch
git checkout cs324
git pull origin v1.4.3
git push origin cs324
Then go to https://github.com/codalab/codalab-worksheets/pull/3949 and wait until the Docker images have finished building for the cs324
tag.
-
Log in to the GCP console and go to the "Compute Engine" product. Click "SSH" on the cs324 instance to SSH into it.
-
Run the following:
cd /var/codalab/codalab-worksheets
git fetch
git checkout cs324
git pull origin cs324
-
Edit
start-cs324.sh
(runvim /var/codalab/start-cs324.sh
) and ensure that the file has the same contents as start-324.sh in the deployment repo. You should manually inspect the files and ensure all changes from the deployment repo are reflected on the file in the GCP instance. (In the future, we could make this process easier.) -
Restart the services:
cd /var/codalab/codalab-worksheets ../start-cs324.sh
The command above will start
cs324.codalab.org
in protected mode. To give verified users access, see the documentation here. -
Test it out by going to cs324.codalab.org and running a few bundles.
-
If everything goes well, Slack other team members and celebrate!
Additional reference¶
For general notes on the initial setup of the cs324 instance, see: https://docs.google.com/document/d/1dX8XrbUOTE1NlbT9GALl9u_nOOGW7oLZ264p8if9qK8/edit