Submission is the Flask application that managed submissions for the 2018 Bird Audio Detection challenge. It is wrapped in a Docker container, largely inspired by (https://github.com/tiangolo/uwsgi-nginx-flask-docker), including an nginx and an uwsgi servers managed by supervisord.
The main features include:
Submission is aimed at being improved by the community to offer a free and generic Kaggle-like challenge platform. Any contribution is welcome!
$ git clone https://github.com/julj/submission.git
$ cd submission
$ mkdir db_backup
$ docker run \
--name submission_db \
-v $(pwd)/db_backup:/var/lib/postgresql/data/pgdata \
-e POSTGRES_USER=myuser \
-e POSTGRES_PASSWORD=mypassword \
-e POSTGRES_DB=submission_db \
-e PGDATA=/var/lib/postgresql/data/pgdata \
-d postgres
$ docker build -t submission web/
$ docker run --name submission --link submission_db:submission_db -p 5455:80 -v $(pwd)/web/submission:/myapp -d submission
$ docker exec submission flask db init
$ docker exec submission flask db migrate
$ docker exec submission flask db upgrade
Now the app is available at localhost:5455
The logs of the app (nginx, uwsgi, Flask errors...) can be seen with
docker logs <submissioncontainerid>
where <submissioncontainerid>
can be seen with
docker ps
If you change the models, make sure to run the migrations, which are managed by Flask-Migrate.
After any change, restart uwsgi:
docker exec submission supervisorctl restart uwsgi
The administration panel can be found at localhost:5455/admin.
email: admin@example.com password: changeme
This can be done by editing the admin user data in localhost:5455/admin/user/.
WARNING: because of short time constraint, some datasetid have been hardcoded here.
Competitions can be created from localhost:5455/admin/competition/. For each competition a ground truth must be uploaded, in the format:
<id>,<datasetid>,<detection probability>
where <id>
is the identifier of the test file, <datasetid>
is self-explanatory and <detection probability>
is self-explanatory too (usually 0 or 1 for the ground truth).
Example:
$ cat groundtruth.csv
file1,dataset1,0
file2,dataset1,0
file3,dataset2,1
file4,dataset2,0
...
User scores can be seen graphically at localhost:5455/scores.
Submissions ca be seen in the administration panel at localhost:5455/admin/submission/.
The submission files are stored in the path specified in web/submission/instance/config.py.
Submission is under MIT license.
Julien Ricard
Hervé Glotin
dyni.contact@gmail.com