Skip to content

Commit 0b0803e

Browse files
committed
use different base image, config files out of shell script
1 parent adff476 commit 0b0803e

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

.streamlit/config.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[server]
2+
headless = true
3+
enableCORS=false
4+
port = 8000

.streamlit/credentials.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[general]
2+

Dockerfile

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
FROM python:3.7.7-buster
1+
FROM python:3.7.7-slim-buster
22

3-
WORKDIR /app
3+
COPY .streamlit ~/
44

55
COPY ./requirements.txt /app/requirements.txt
66

7-
RUN pip install -r requirements.txt
7+
WORKDIR /app
8+
9+
RUN pip install -q -r requirements.txt
810

911
COPY . ./
1012

11-
RUN chmod u+x setup.sh && PORT=8000 ./setup.sh
12-
13-
# expanding shell variables in CMD is tricky, see
14-
# https://stackoverflow.com/questions/23071214/use-environment-variables-in-cmd
15-
CMD ["streamlit", "run", "--server.port", "8000", "app.py"]
13+
CMD ["streamlit", "run", "app.py"]

0 commit comments

Comments
 (0)