Skip to content

Commit 89776d4

Browse files
committed
Add Dockerfile
1 parent 35814b9 commit 89776d4

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM python:3.7
2+
3+
RUN mkdir -p /home/project/dash_app
4+
WORKDIR /home/project/dash_app
5+
6+
RUN pip install --no-cache-dir numpy scipy
7+
8+
ADD requirements.txt /home/project/dash_app/requirements.txt
9+
RUN pip install --no-cache-dir -r requirements.txt
10+
11+
# Dash callbacks are blocking, and also often network-limited
12+
# rather than CPU-limited, so using NUM_WORKERS >> number of
13+
# CPU cores is sensible
14+
ENV NUM_WORKERS=64
15+
ENV MAILTO=YOUR_EMAIL_HERE
16+
ENV PMG_MAPI_KEY=YOUR_MP_API_KEY_HERE
17+
18+
ADD . /home/project/dash_app
19+
20+
CMD gunicorn --workers=$NUM_WORKERS --bind=0.0.0.0 app:server

0 commit comments

Comments
 (0)