-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
40 lines (28 loc) · 884 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
FROM python:3.9 as build
USER root
RUN mkdir /home/wannadb
WORKDIR /home/wannadb
# install torch
RUN pip install --use-pep517 torch==1.10.0
# Install dependencies
COPY core-requirements.txt core-requirements.txt
RUN pip install --use-pep517 -r core-requirements.txt
COPY backend-requirements.txt backend-requirements.txt
RUN pip install --use-pep517 -r backend-requirements.txt
##################################
## do not change above ##
## changes above cause ##
## long loading times ##
##################################
# Run tests
RUN pip install --use-pep517 pytest
#RUN pytest
#copy the rest
COPY . .
FROM build as dev
#CMD [ "python", "app.py" ]
CMD ["flask", "--app", "app", "--debug", "run","--host","0.0.0.0", "--port", "8000" ]
FROM build as prod
RUN chmod +x entrypoint.sh
# Define the entrypoint.sh
CMD ["sh","./entrypoint.sh"]