WaysAhead Global commited on
Commit
bc3da43
·
verified ·
1 Parent(s): a2d96d9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -0
Dockerfile CHANGED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ git \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ # Set Streamlit cache dir to /tmp
12
+ ENV STREAMLIT_HOME=/tmp/.streamlit
13
+ ENV STREAMLIT_CONFIG_DIR=/tmp/.streamlit
14
+ ENV XDG_CONFIG_HOME=/tmp
15
+
16
+ # Install dependencies
17
+ COPY requirements.txt .
18
+ RUN pip3 install --no-cache-dir -r requirements.txt
19
+
20
+ # Copy Streamlit app code
21
+ COPY src/ . # make sure your app is inside src/streamlit_app.py
22
+
23
+ # Expose default Streamlit port
24
+ EXPOSE 8501
25
+
26
+ HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
27
+
28
+ ENTRYPOINT ["streamlit", "run", "streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]