File size: 806 Bytes
663f514
c1528fc
ffd91a0
663f514
ffd91a0
 
663f514
c1528fc
ffd91a0
663f514
 
ffd91a0
663f514
 
 
 
 
 
 
c1528fc
ffd91a0
663f514
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Use a lightweight Python 3.9 base image
FROM python:3.9-slim

# Set working directory inside the container
WORKDIR /app

# Copy all project files into the container
COPY . .

# Install dependencies from requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

# Expose Streamlit’s default port
EXPOSE 8501

# Run Streamlit app on container startup
# --server.address=0.0.0.0      → makes Streamlit reachable from outside the container
# --server.port=8501            → fixed port
# --server.enableXsrfProtection=false → needed for batch API calls (HuggingFace Spaces fix)
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"]

# NOTE:
# XSRF protection is disabled ONLY to allow batch API requests without failing.