Amey9766 commited on
Commit
bd206dd
·
verified ·
1 Parent(s): b8f50fb

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -11
Dockerfile CHANGED
@@ -1,10 +1,8 @@
1
- # Use a small Python base
2
  FROM python:3.13-slim
3
 
4
- # Workdir inside the container
5
  WORKDIR /workspace
6
 
7
- # System deps (minimal) and cleanup
8
  RUN apt-get update && apt-get install -y --no-install-recommends \
9
  build-essential curl git && \
10
  rm -rf /var/lib/apt/lists/*
@@ -16,23 +14,24 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
16
  STREAMLIT_HOME=/tmp \
17
  STREAMLIT_TELEMETRY_ENABLED=false
18
 
19
- # Install Python deps first for better caching
20
  COPY requirements.txt ./requirements.txt
21
  RUN pip install -r requirements.txt
22
 
23
- # Copy the rest of the repo (including your app code)
24
  COPY . .
25
 
26
- # Hugging Face Spaces will set $PORT; keep a default for local testing
27
  ENV PORT=7860
 
 
28
 
29
- # 👇 Your Streamlit entry file (change if different)
30
- ENV APP_FILE=src/streamlit_app.py
31
-
32
- # Run Streamlit bound to 0.0.0.0 and $PORT, with proxy-friendly flags
33
  CMD ["bash","-lc","streamlit run $APP_FILE \
34
  --server.address 0.0.0.0 \
35
  --server.port $PORT \
36
  --server.headless true \
37
  --server.enableCORS false \
38
- --server.enableXsrfProtection false"]
 
 
 
 
1
  FROM python:3.13-slim
2
 
 
3
  WORKDIR /workspace
4
 
5
+ # Minimal system deps
6
  RUN apt-get update && apt-get install -y --no-install-recommends \
7
  build-essential curl git && \
8
  rm -rf /var/lib/apt/lists/*
 
14
  STREAMLIT_HOME=/tmp \
15
  STREAMLIT_TELEMETRY_ENABLED=false
16
 
17
+ # Install Python deps first for faster rebuilds
18
  COPY requirements.txt ./requirements.txt
19
  RUN pip install -r requirements.txt
20
 
21
+ # Copy the rest of the Space repo (includes streamlit_app.py)
22
  COPY . .
23
 
24
+ # Hugging Face Spaces sets $PORT (keep a default for local testing)
25
  ENV PORT=7860
26
+ # Your app file is at the repo root
27
+ ENV APP_FILE=streamlit_app.py
28
 
29
+ # Run Streamlit bound to the Space proxy, with proxy-friendly flags
 
 
 
30
  CMD ["bash","-lc","streamlit run $APP_FILE \
31
  --server.address 0.0.0.0 \
32
  --server.port $PORT \
33
  --server.headless true \
34
  --server.enableCORS false \
35
+ --server.enableXsrfProtection false \
36
+ --browser.gatherUsageStats false \
37
+ --server.fileWatcherType none"]