tailored / Dockerfile
ibraheem007's picture
Update Dockerfile
51c2398 verified
raw
history blame contribute delete
769 Bytes
FROM python:3.9-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
curl \
gcc \
g++ \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first for better caching
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy app code
COPY . .
# Expose port (USE 8501 for HuggingFace Spaces)
EXPOSE 8501
# Set environment variables (USE 8501)
ENV STREAMLIT_SERVER_PORT=8501
ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0
ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
# Run Streamlit from src folder with XSRF protection disabled
CMD ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"]