WaysAheadGlobal commited on
Commit
cbdbe70
·
verified ·
1 Parent(s): bc3da43

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -4
Dockerfile CHANGED
@@ -1,5 +1,6 @@
1
  FROM python:3.9-slim
2
 
 
3
  WORKDIR /app
4
 
5
  RUN apt-get update && apt-get install -y \
@@ -8,7 +9,7 @@ RUN apt-get update && apt-get install -y \
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
@@ -17,10 +18,11 @@ ENV XDG_CONFIG_HOME=/tmp
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
 
1
  FROM python:3.9-slim
2
 
3
+ # Create app directory
4
  WORKDIR /app
5
 
6
  RUN apt-get update && apt-get install -y \
 
9
  git \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
+ # Set a writable streamlit config/cache directory
13
  ENV STREAMLIT_HOME=/tmp/.streamlit
14
  ENV STREAMLIT_CONFIG_DIR=/tmp/.streamlit
15
  ENV XDG_CONFIG_HOME=/tmp
 
18
  COPY requirements.txt .
19
  RUN pip3 install --no-cache-dir -r requirements.txt
20
 
21
+ # Copy app source
22
+ COPY ./src ./src
23
+ WORKDIR /app/src
24
 
25
+ # Expose Streamlit default port
26
  EXPOSE 8501
27
 
28
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1