SaaurabhR commited on
Commit
c44aebb
·
verified ·
1 Parent(s): f962741

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -10
Dockerfile CHANGED
@@ -3,26 +3,25 @@ FROM python:3.11-slim
3
  # Workdir inside container
4
  WORKDIR /app
5
 
6
- # System packages (minimal)
7
  RUN apt-get update && apt-get install -y \
8
  build-essential \
9
  curl \
10
  git \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
- # Copy project files from Space repo
14
  COPY requirements.txt ./
15
- COPY app/ ./app/
16
 
17
- # Install Python dependencies
18
  RUN pip install --no-cache-dir --upgrade pip && \
19
  pip install -r requirements.txt
20
 
21
- # Streamlit port
22
- EXPOSE 7860
23
 
24
- # Simple healthcheck (optional)
25
- HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health || exit 1
26
 
27
- # Run your Streamlit app from app/app_streamlit.py
28
- ENTRYPOINT ["streamlit", "run", "app/app_streamlit.py", "--server.port=7860", "--server.address=0.0.0.0"]
 
3
  # Workdir inside container
4
  WORKDIR /app
5
 
6
+ # System dependencies (minimal)
7
  RUN apt-get update && apt-get install -y \
8
  build-essential \
9
  curl \
10
  git \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
+ # Copy deps and source from Space repo
14
  COPY requirements.txt ./
15
+ COPY src/ ./src/
16
 
17
+ # Install Python packages
18
  RUN pip install --no-cache-dir --upgrade pip && \
19
  pip install -r requirements.txt
20
 
21
+ # Expose Streamlit port
22
+ EXPOSE 8501
23
 
24
+ HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
 
25
 
26
+ # Run the Streamlit app located in src/streamlit_app.py
27
+ ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]