A submission to the Prosocial Ranking Challenge
Note — the main project files for each of the components are located in app
. This directory structure is a relic of starting from the template code which we can fix at some point.
Helpful Docs — Poetry, Celery, Redis, JSONPath
These variables are specified in docker-compose.yml
(To be updated). Copied here for reference.
Component | Location |
---|---|
ranker | 0.0.0.0:5001 |
postgres | postgres://postgres:postgres@database:5432 |
redis | redis://redis:6379 |
redis-celery-broker | redis://redis-celery-broker:6380 |
Variable | Description | Docker default |
---|---|---|
DANTE_CACHE_DIR |
Location for data / model cache | /app/cache/ |
DANTE_CONFIG_PATH |
Path to configuration file | /app/config.ini |
DANTE_LOG_DIR |
Location for logs | `/app/logs/ |
All commands are executed from the root directory of the repository.
$version
, while the $appname
is dante
. So for example on my Linux laptop the user cache dir is located at /home/<username>/.cache/dante/
.config.ini
to the root of the repository. This is meant to supply the configuration without needing to rebuild the image, which will be helpful when deploying in production. But for now you can copy this file from our example config: cp dante/osomerank/config.ini.sample config.ini
make run
export DANTE_CACHE_DIR=/path/to/files # The path where you store the Google Drive contents
docker build -f docker/Dockerfile.ranker -t ranker .
docker run --mount type=bind,src=${DANTE_CACHE_DIR},dst=/app/cache ranker
Your personal machine might fill up when repeatedly building all these docker images and volumes. To clear space, run:
sudo docker system prune -a
sudo docker volume prune -a
When developing, an optional dependency group for development is provided in pyproject file. This can be installed with:
poetry install --with=dev