Spaces:
Runtime error
Runtime error
| # Use an official lightweight Python base image | |
| FROM python:3.10-slim | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy requirement file and install dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy all project files | |
| COPY . . | |
| # Streamlit configuration (optional override) | |
| ENV STREAMLIT_SERVER_HEADLESS=true \ | |
| STREAMLIT_SERVER_PORT=7860 \ | |
| STREAMLIT_SERVER_ENABLECORS=false | |
| # Expose the correct port for Hugging Face (must be 7860) | |
| EXPOSE 7860 | |
| # Run the app | |
| CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"] |