Spaces:
Sleeping
Sleeping
| FROM python:3.12-slim | |
| # Install system dependencies (only what’s needed for pip + BigQuery client) | |
| RUN apt-get update && apt-get install -y \ | |
| gcc \ | |
| libpq-dev \ | |
| curl \ | |
| ca-certificates \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Set working directory | |
| WORKDIR /workspace | |
| # Copy requirements first (better Docker caching) | |
| COPY requirements.txt . | |
| # Install Python dependencies | |
| RUN pip install --upgrade pip && \ | |
| pip install --no-cache-dir -r requirements.txt | |
| # Copy the rest of the code | |
| COPY . /workspace | |
| # Expose FastAPI port (if using API mode) | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |