Submission is the Flask application that managed submissions for the 2016 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:
- Basic user management (register/login/logout)
- Admin panel to manage admin users and competitions
- Automatic score computation from uploaded submission files
- Score visualisation with Google Charts
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/icml.git
$ cd icml
$ mkdir db_backup
3 - Run postgres container and mount database to host volume
$ docker run \
--name icml_db \
-v $(pwd)/db_backup:/var/lib/postgresql/data/pgdata \
-e POSTGRES_USER=myuser \
-e POSTGRES_PASSWORD=mypassword \
-e POSTGRES_DB=icml_db \
-e PGDATA=/var/lib/postgresql/data/pgdata \
-d postgres
$ docker build -t icml .
$ docker run --name icml --link icml_db:icml_db -p 5455:80 -v $(pwd)/app:/app -d icml
6 - Initialize db and migrate (https://flask-migrate.readthedocs.io/en/latest/)
$ docker exec icml python /app/manage.py db init
$ docker exec icml python /app/manage.py db migrate
$ docker exec icml python /app/manage.py db upgrade
Now the app is available at http://example.com:5455
The logs of the app (nginx, uwsgi, Flask errors...) can be seen with
docker logs <icmlcontainerid>
where <icmlcontainerid>
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 icml supervisorctl restart uwsgi
The administration panel can be found at http://<yourdomain>:5455/admin.
email: [email protected] password: changeme
This can be done by editing the admin user data in http://<yourdomain>:5455/admin/user/.
Competitions can be created from http://<yourdomain>:5455/admin/competition/. For each competition a ground truth must be uploaded, in the format:
<id>,<detection probability>
where <id>
is the identifier of the test instance and <detection probability>
is self-explanatory (usually 0 or 1 for the ground truth).
Example:
$ cat groundtruth.csv
0,0
1,0
2,1
3,0
...
User scores can be seen graphically at http://<yourdomain>:5455/scores.
Submissions ca be seen in the administration panel at http://<yourdomain>:5455/admin/submission/.
The submission files are stored in the path specified in config.py.
Submission is under MIT license.
Julien Ricard Hervé Glotin [email protected]