Spaces:
Runtime error
Runtime error
| # Use Python 3.11 slim image | |
| FROM python:3.11-slim | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y git wget && rm -rf /var/lib/apt/lists/* | |
| # Create a non-root user | |
| RUN useradd -m appuser | |
| USER appuser | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy and install Python dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy app files | |
| COPY . . | |
| # Expose port 8000 for FastAPI | |
| EXPOSE 8000 | |
| # Start FastAPI server | |
| CMD ["python", "app.py"] | |