This code is the backend of https://bbchallenge.org.
python3.9 -m venv venv
source venv/bin/activate
pip install --upgrade pip
Two cases:
- production:
pip install -r requirements.txt
- development:
pip install -r requirements-dev.txt
bbchallenge-api
relies on several binary files:
- The seed database of bbchallenge, path to it is specified in
config.py/DB_PATH
- The undecided index file of bbchallenge, path to it is specified in
config.py/DB_PATH_UNDECIDED
- All the index files of decided machines, currently available at http://docs.bbchallenge.org/bb5_decided_indexes/. Path to their containing folder is specified in
config.py/DB_PATH_DECIDED
Once you have setup these files, you are good to go with:
- production:
python run_gunicorn.py
(for production deployment you may use a nginx/wsgi/systemd setup on top of gunicorn, this tutorial can help you) - development:
python run.py
(orflask run
but you may have to runhash -r
first)