diff options
author | Adam Novak | 2020-04-09 15:52:23 -0700 |
---|---|---|
committer | Adam Novak | 2020-04-09 15:52:23 -0700 |
commit | 2cd6623aa0ddfe4e42b2d434e0523773bb3536ef (patch) | |
tree | 6c8a99afdf03837dba83e9d956f60316c09391d3 /README.md | |
parent | ec6f3ad6268f576c1302101c7f0761fbf1d3dc55 (diff) | |
download | bh20-seq-resource-2cd6623aa0ddfe4e42b2d434e0523773bb3536ef.tar.gz bh20-seq-resource-2cd6623aa0ddfe4e42b2d434e0523773bb3536ef.tar.lz bh20-seq-resource-2cd6623aa0ddfe4e42b2d434e0523773bb3536ef.zip |
Copy over/combine top-level project components
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 45 |
1 files changed, 45 insertions, 0 deletions
@@ -159,4 +159,49 @@ odgi viz -i seqs.odgi -o seqs.png -x 4000 -y 500 -R -P 5 For more information on building pangenome models, [see this wiki page](https://github.com/virtual-biohackathons/covid-19-bh20/wiki/Pangenome#pangenome-model-from-available-genomes). +# Web Interface + +This project comes with a simple web server that lets you use the sequence uploader from a browser. It will work as long as you install the packager with the `web` extra. + +To run it locally: + +``` +virtualenv --python python3 venv +. venv/bin/activate +pip install -e .[web] +env FLASK_APP=bh20simplewebuploader/main.py flask run +``` + +Then visit [http://127.0.0.1:5000/](http://127.0.0.1:5000/). + +## Production + +For production deployment, you can use [gunicorn](https://flask.palletsprojects.com/en/1.1.x/deploying/wsgi-standalone/#gunicorn): + +``` +pip3 install gunicorn +gunicorn bh20simplewebuploader.main:app +``` + +This runs on [http://127.0.0.1:8000/](http://127.0.0.1:8000/) by default, but can be adjusted with various [gunicorn options](http://docs.gunicorn.org/en/latest/run.html#commonly-used-arguments) + +## GNU Guix + +To run the web uploader in a GNU Guix environment + +``` +guix environment guix --ad-hoc git python python-flask python-pyyaml nss-certs --network openssl -- env FLASK_APP=bh20simplewebuploader/main.py flask run +``` + +The containerized version looks like + +``` +guix environment -C guix --ad-hoc git python python-flask python-pyyaml nss-certs --network openssl +``` + +and + +``` +env FLASK_APP=bh20simplewebuploader/main.py flask run +``` |