ktejeshnaidu commited on
Commit
94a7c37
·
verified ·
1 Parent(s): 7f5bdfd

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -6
Dockerfile CHANGED
@@ -2,25 +2,22 @@ FROM python:3.12-slim
2
 
3
  WORKDIR /app
4
 
5
- # Install system dependencies
6
  RUN apt-get update && apt-get install -y \
7
  build-essential \
8
  curl \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
- # Copy requirements and install Python dependencies
12
  COPY requirements.txt .
13
  RUN pip install --no-cache-dir -r requirements.txt
14
 
15
- # Copy application files
16
  COPY . .
17
 
18
- # HuggingFace Spaces requires port 7860
19
  EXPOSE 7860
20
 
21
- # Start FastAPI backend on 8000 (background) + Streamlit on 7860 (foreground)
22
  CMD uvicorn main:app --host 0.0.0.0 --port 8000 & \
23
  streamlit run app.py \
24
  --server.port=7860 \
25
  --server.address=0.0.0.0 \
26
- --server.headless=true
 
 
 
2
 
3
  WORKDIR /app
4
 
 
5
  RUN apt-get update && apt-get install -y \
6
  build-essential \
7
  curl \
8
  && rm -rf /var/lib/apt/lists/*
9
 
 
10
  COPY requirements.txt .
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
 
13
  COPY . .
14
 
 
15
  EXPOSE 7860
16
 
 
17
  CMD uvicorn main:app --host 0.0.0.0 --port 8000 & \
18
  streamlit run app.py \
19
  --server.port=7860 \
20
  --server.address=0.0.0.0 \
21
+ --server.headless=true \
22
+ --server.enableCORS=false \
23
+ --server.enableXsrfProtection=false