Skip to content

Commit 1364e4c

Browse files
author
Eric Smyth
committed
Change to Dockerfile to improve layer caching. Includes temp hack due to implementation of setup.py
1 parent 3e8f762 commit 1364e4c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
FROM python:3.7.7-slim-buster
22
RUN mkdir /app
33
WORKDIR /app
4-
COPY .streamlit .streamlit
54
COPY README.md .
65
COPY setup.py .
6+
# Creating an empty src dir is a (hopefully) temporary hack to improve layer caching and speed up image builds
7+
# todo fix once the Pipfile, setup.py, requirements.txt, pyprojec.toml build/dist story is figured out
8+
RUN mkdir src && pip install -q .
9+
COPY .streamlit .streamlit
710
COPY settings.cfg .
811
COPY src src
9-
RUN pip install -q .
1012

1113
CMD ["streamlit", "run", "src/app.py"]

0 commit comments

Comments
 (0)