Dockerize a Python Dash app for quick prototyping.
prod
version is served by gunicorn
instead of the flask
dev server.
# dev
docker build -f Dockerfile.dev -t docker-dash-example-dev .
docker run -p 8050:8050 -v "$(pwd)"/app:/app --rm docker-dash-example-dev
# prod
docker build -f Dockerfile -t docker-dash-example-prod .
docker run -p 8050:8050 -v "$(pwd)"/app:/app --rm docker-dash-example-prod
Go to http://localhost:8050
in browser.
ENV DASH_DEBUG_MODE True # False
Install the app requirements for development to get better editor support.
poetry install
Optional: clean initialization of poetry
:
poetry init
cat app/requirements.txt | xargs poetry add