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 <your_email@example.com>" | |
| 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"] |