Add Dockerfile example
Browse files- Dockerfile +20 -0
- README.md +5 -2
Dockerfile
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.9-slim
|
2 |
+
|
3 |
+
WORKDIR /app
|
4 |
+
|
5 |
+
RUN apt-get update && apt-get install -y \
|
6 |
+
build-essential \
|
7 |
+
curl \
|
8 |
+
software-properties-common \
|
9 |
+
git \
|
10 |
+
&& rm -rf /var/lib/apt/lists/*
|
11 |
+
|
12 |
+
RUN git clone https://github.com/streamlit/streamlit-example.git .
|
13 |
+
|
14 |
+
RUN pip3 install -r requirements.txt
|
15 |
+
|
16 |
+
EXPOSE 8501
|
17 |
+
|
18 |
+
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
19 |
+
|
20 |
+
ENTRYPOINT ["streamlit", "run", "streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
README.md
CHANGED
@@ -2,10 +2,13 @@
|
|
2 |
title: Streamlit Template Space
|
3 |
emoji: 🚀
|
4 |
colorFrom: red
|
5 |
-
colorTo:
|
6 |
sdk: docker
|
|
|
|
|
|
|
7 |
pinned: false
|
8 |
short_description: Streamlit template space
|
9 |
---
|
10 |
|
11 |
-
Check out the configuration reference at https://
|
|
|
2 |
title: Streamlit Template Space
|
3 |
emoji: 🚀
|
4 |
colorFrom: red
|
5 |
+
colorTo: red
|
6 |
sdk: docker
|
7 |
+
app_port: 8501
|
8 |
+
tags:
|
9 |
+
- streamlit
|
10 |
pinned: false
|
11 |
short_description: Streamlit template space
|
12 |
---
|
13 |
|
14 |
+
Check out the configuration reference at https://docs.streamlit.io/deploy/tutorials/docker
|