Spaces:
Runtime error
Runtime error
| # Stable Python version compatible with ML libraries | |
| FROM python:3.10-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Prevent Python from writing pyc files & enable logs | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| # Install system dependencies (important for numpy, tensorflow, opencv, etc.) | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| curl \ | |
| git \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Upgrade pip (important for tensorflow installs) | |
| RUN pip install --no-cache-dir --upgrade pip | |
| # Copy only requirements first (better caching) | |
| COPY requirements.txt . | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application code | |
| COPY src/ ./src/ | |
| # Expose Streamlit default port | |
| EXPOSE 8501 | |
| # Run Streamlit app | |
| CMD ["streamlit", "run", "src/app.py", "--server.port=8501", "--server.address=0.0.0.0"] |