Myllm / Dockerfile
shakeel143's picture
Create Dockerfile
5bfad6c verified
raw
history blame contribute delete
718 Bytes
# 🧱 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"]