shakeel143 commited on
Commit
5bfad6c
·
verified ·
1 Parent(s): 9991951

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -0
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 🧱 Base image with Python and CUDA support (for GPU)
2
+ FROM pytorch/pytorch:2.3.0-cuda11.8-cudnn8-runtime
3
+
4
+ # 👤 Metadata
5
+ LABEL maintainer="Shakeel Ahmed <[email protected]>"
6
+ LABEL description="DeepSeek-R1-Distill-Llama-8B FastAPI Server"
7
+
8
+ # 🏗️ Create working directory
9
+ WORKDIR /app
10
+
11
+ # 🧾 Copy files
12
+ COPY requirements.txt .
13
+ RUN pip install --no-cache-dir -r requirements.txt
14
+
15
+ # 🧠 Copy app code
16
+ COPY app.py .
17
+ COPY README.md .
18
+
19
+ # ⚡ Optional: Environment variables for performance
20
+ ENV TRANSFORMERS_CACHE=/app/cache \
21
+ PYTHONUNBUFFERED=1 \
22
+ HF_HOME=/app/hf_home
23
+
24
+ # 🧰 Expose port
25
+ EXPOSE 7860
26
+
27
+ # 🚀 Run FastAPI app with Uvicorn
28
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]