sid22669 commited on
Commit
8cc2f47
·
verified ·
1 Parent(s): 2231637

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -16
Dockerfile CHANGED
@@ -2,35 +2,23 @@ FROM python:3.9-slim
2
 
3
  WORKDIR /app
4
 
5
- # Set writable home directory for Streamlit
6
- ENV HOME=/app
 
7
 
8
- # Install system dependencies
9
  RUN apt-get update && apt-get install -y \
10
  build-essential \
11
  curl \
12
  git \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
- # Create .streamlit directory
16
- RUN mkdir -p $HOME/.streamlit && chmod -R 777 $HOME/.streamlit
17
-
18
- # Copy everything into the container
19
  COPY . .
20
 
21
- RUN apt-get update && apt-get install -y git-lfs \
22
- && git lfs install \
23
- && git lfs pull
24
-
25
-
26
- # Install Python dependencies
27
  RUN pip install --no-cache-dir -r requirements.txt
28
 
29
- # Expose Streamlit's default port
30
  EXPOSE 8501
31
 
32
- # Healthcheck endpoint
33
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
34
 
35
  ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
36
-
 
2
 
3
  WORKDIR /app
4
 
5
+ # Set environment variables
6
+ ENV HOME=/tmp
7
+ ENV STREAMLIT_HOME=/tmp
8
 
9
+ # Install dependencies
10
  RUN apt-get update && apt-get install -y \
11
  build-essential \
12
  curl \
13
  git \
14
  && rm -rf /var/lib/apt/lists/*
15
 
 
 
 
 
16
  COPY . .
17
 
 
 
 
 
 
 
18
  RUN pip install --no-cache-dir -r requirements.txt
19
 
 
20
  EXPOSE 8501
21
 
 
22
  HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
23
 
24
  ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]