Skip to content

Setup Local Competitions

lr292358 edited this page Oct 12, 2017 · 23 revisions

Install the prerequisites


Verify docker-compose is installed

docker-compose ps

If not see Docker-Compose Install

1. Get the source.

Clone the repo locally, or fork it and clone your own copy. You may choose your own structure, but we recommend creating a src folder in your local user home folder. IE: ~/src/

Codalab Git URL

Note: CLI Syntax shown is for Linux/MacOS

cd ~
mkdir src
cd src
git clone https://github.com/codalab/codalab-competitions.git

You should end up with a file structure like so: ~/src/codalab-competitions/ With the root folder containing a docker-compose.yaml file.

2. Create folders, and update permissions on existing folders:

  • Navigate to the root folder of the project. IE: ~/src/codalab-competitions

Run the following commands:

- mkdir var && sudo chown youruser:youruser -R var
- mkdir /tmp/codalab && sudo chown youruser:youruser -R /tmp/codalab

If you ever encounter any problems with permissions, IE: A permission denied error in a traceback, this might fix your issues.

- sudo chmod 777 /tmp/codalab

3. Setup environment variables:

Note: If you do not see the .env files, ensure you can view hidden files and folders on your system.

  • A sample .env file is provided for you with the name .env_sample.
  • Copy this file, but rename it .env
  • Edit this file as necessary. You will need to provide AWS/Azure info/settings, but the rest of the defaults should be fine.

4. Run Docker:

  • Run docker-compose up -d to bring everything to an up state if it's not, in detached mode.
  • Run docker-compose logs -f to view the logs and verify everything is working

Basic Command/Debugging Reference:

Developer Guidelines:

Clone this wiki locally