Spaces:
Runtime error
Runtime error
| # π§± Base image with Python and CUDA support (for GPU) | |
| FROM pytorch/pytorch:2.3.0-cuda11.8-cudnn8-runtime | |
| # π€ Metadata | |
| LABEL maintainer="Shakeel Ahmed <[email protected]>" | |
| LABEL description="DeepSeek-R1-Distill-Llama-8B FastAPI Server" | |
| # ποΈ Create working directory | |
| WORKDIR /app | |
| # π§Ύ Copy files | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # π§ Copy app code | |
| COPY app.py . | |
| COPY README.md . | |
| # β‘ Optional: Environment variables for performance | |
| ENV TRANSFORMERS_CACHE=/app/cache \ | |
| PYTHONUNBUFFERED=1 \ | |
| HF_HOME=/app/hf_home | |
| # π§° Expose port | |
| EXPOSE 7860 | |
| # π Run FastAPI app with Uvicorn | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |