forked from Berkeley-Quantum-Horizons/qlp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
45 lines (37 loc) · 1.05 KB
/
Dockerfile
File metadata and controls
45 lines (37 loc) · 1.05 KB
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
40
41
42
43
44
45
# Load in python image
FROM python:3.7-buster
# Who to contact
MAINTAINER Christopher Körber
# Environment variables and dirs used
ENV APP_DIR=/opt/app
# Create dirs
RUN mkdir -p $APP_DIR
RUN mkdir -p $APP_DIR/qlp
RUN mkdir -p $APP_DIR/qlpdb
RUN mkdir -p $APP_DIR/.pip_cache
# Install requirements
RUN pip install --upgrade pip --cache-dir $APP_DIR/.pip_cache
## Install qlp
WORKDIR $APP_DIR/qlp
COPY qlp/requirements.txt .
COPY qlp/README.md .
COPY qlp/setup.py .
COPY qlp/qlp qlp
RUN pip install -r requirements.txt --cache-dir $APP_DIR/.pip_cache
RUN pip install .
# Install qlpdb
# DO NOT COPY FILES LIKE db-config.yaml or settings.yaml if they contain secrete passwords
WORKDIR $APP_DIR/qlpdb
COPY qlpdb/requirements.txt .
COPY qlpdb/setup.py .
COPY qlpdb/settings.yaml .
COPY qlpdb/db-config.yaml db-config.yaml
COPY qlpdb/README.md .
COPY qlpdb/manage.py .
COPY qlpdb/qlpdb qlpdb
RUN pip install -r requirements.txt --cache-dir $APP_DIR/.pip_cache
RUN pip install .
# Port to expose
EXPOSE 8000
# Run entrypoint script
CMD ["python", "manage.py", "runserver"]