bhumitps commited on
Commit
12b0bc7
·
verified ·
1 Parent(s): ebc4950

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -8
Dockerfile CHANGED
@@ -8,16 +8,20 @@ ENV PYTHONUNBUFFERED=1 \
8
  WORKDIR /app
9
 
10
  # Copy requirements and install
11
- COPY requirements.txt .
12
- RUN pip install --upgrade pip \
13
- && pip install -r requirements.txt
14
 
15
  # Copy the rest of the app (app.py, etc.)
16
- COPY . .
17
 
18
- # Hugging Face Spaces sets PORT (usually 7860); we respect it.
19
- ENV PORT=7860
20
  EXPOSE 7860
21
 
22
- # Start Streamlit directly on 0.0.0.0:7860 in headless mode
23
- CMD ["bash", "-c", "streamlit run app.py --server.port=$PORT --server.address=0.0.0.0 --server.headless=true"]
 
 
 
 
 
 
8
  WORKDIR /app
9
 
10
  # Copy requirements and install
11
+ COPY requirements.txt /app/requirements.txt
12
+ RUN pip install --no-cache-dir --upgrade pip \
13
+ && pip install --no-cache-dir -r /app/requirements.txt
14
 
15
  # Copy the rest of the app (app.py, etc.)
16
+ COPY . /app
17
 
18
+ # Hugging Face Docker Spaces expose port 7860; we listen on it directly
 
19
  EXPOSE 7860
20
 
21
+ # Start Streamlit directly (no bash, use exec form)
22
+ CMD ["streamlit", "run", "app.py",
23
+ "--server.port=7860",
24
+ "--server.address=0.0.0.0",
25
+ "--server.headless=true",
26
+ "--server.enableCORS=false",
27
+ "--server.enableXsrfProtection=false"]