Skip to content

Codabench Installation

Adrien Pavão edited this page Feb 13, 2023 · 21 revisions

Installation Guide

Installing Codabench should be relatively easy since you no longer have to worry about special ways to setup SSL or storage. We include default solutions that should handle that for most basic uses.

1. Pre-requisites

Install Docker

Either:

a) Install docker via the install script: https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-using-the-convenience-script

b) Install manually following the steps at: https://docs.docker.com/install/

Install Docker-Compose

https://docs.docker.com/compose/install/

2. Clone Repository

Download the Codabench repository:

git clone https://github.com/codalab/codabench

3. Edit the settings (.env)

The .env file contains the settings of your instance. At first you don't have the .env file. To create it, copy the .env_sample as following:

cd codabench
cp .env_sample .env

Then edit the necessary settings inside. The most important are the database, storage, and Caddy/SSL settings.

For Mac

In .env, replace:

SUBMISSIONS_API_URL=http://localhost/api
[...]
AWS_S3_ENDPOINT_URL=http://localhost:9000/

by

SUBMISSIONS_API_URL=http://example.com/api
[...]
AWS_S3_ENDPOINT_URL=http://docker.for.mac.localhost:9000/

4. Start the service

To deploy the platform, run:

docker-compose up -d

You should be able to verify it is running correctly by looking at the logs with docker-compose logs -f and by visting localhost:80 (Depending on your configuration).

Advanced Configuration

Testing

To run automated tests for your local instance, get inside the Django constainer with docker-compose exec django bash then run py.test to start the automated tests.

SSL

To enable SSL:

  • If you already have a DNS for your server that is appropriate, in the .env simply set DOMAIN_NAME to your DNS. Remove any port designation like :80. This will have Caddy serve both HTTP and HTTPS.

Storage

By default v2 uses a built-in minio container. Some users may want a different solution such as S3 or Azure. The configuration will vary slightly for each different type of storage.

For all possible supported storage solutions, see: https://django-storages.readthedocs.io/en/latest/

Remote Compute Workers

For setting up remote compute workers, please see this link to the wiki article on setting up compute workers: Compute Worker Management

Clone this wiki locally