-
Notifications
You must be signed in to change notification settings - Fork 0
Setup
Of course you can do this without miniconda/conda but save yourself some headache!
see also: https://github.com/NLP4ALL/nlp4all/wiki/Development-Environment
first install:
- install docker: https://www.docker.com/products/docker-desktop/
- copy / rename
app.env-example
toapp.env
- copy / rename
db.env-example
todb.env
# build the images, and spin them up
docker compose -f compose.yaml up -d --build
# create the database
docker compose -f compose.yaml exec app flask --app nlp4all init-db
to monitor output:
docker compose logs -f
To destroy and rebuild (including volumes/DB)
docker compose down -v
docker compose up -d --build
docker compose exec app flask --app nlp4all init-db
the site will now be available outside the container, on port 80, if you run this on your local machine then you can access it from: http://localhost/
Pretty much same as above, but instead of using gunicorn and nginx, it will serve the flask development server directly with debugging enabled. You should also always specify after docker compose
the file i.e. docker compose -f compose.development.yaml ...
Build and start the dev env:
# build the images, and spin them up
docker compose -f compose.development.yaml up -d --build
# create the database
docker compose -f compose.development.yaml exec app flask --app nlp4all init-db
To destroy and rebuild (including volumes/DB)
docker compose -f compose.development.yaml down -v
docker compose -f compose.development.yaml up -d --build
docker compose -f compose.development.yaml exec app flask --app nlp4all init-db
You can now visit the site by going to http://localhost:5000/
conda create -n nlp4all python=3.9
conda activate nlp4all
pip install -r requirements-dev.txt
python db_del_and_init.py
python ./run_dev.py