Akwbw commited on
Commit
3dd9fef
·
verified ·
1 Parent(s): aa0026f

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +29 -0
Dockerfile ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Dockerfile
2
+
3
+ # Base image jo Python aur ML ke liye zaroori libraries rakhti hai
4
+ # Agar Free Tier par GPU nahi milta to 'python:3.10-slim' use karein
5
+ # Lekin hum zyada compatibility ke liye 'python:3.10' base rakhenge
6
+ FROM python:3.10-slim
7
+
8
+ # Directory banaein aur usay working directory set karein
9
+ WORKDIR /app
10
+
11
+ # Dependencies file ko copy karein
12
+ COPY requirements.txt .
13
+
14
+ # Dependencies install karein
15
+ RUN pip install --no-cache-dir -r requirements.txt
16
+
17
+ # Aapki app file ko copy karein
18
+ COPY app.py .
19
+
20
+ # Agar aapke pass koi model weights hain to unhe bhi copy karein, lekin
21
+ # Real-ESRGAN khud hi internet se pre-trained weights download karta hai.
22
+
23
+ # Hugging Face Spaces port 7860 par application run hone ki ummeed rakhta hai
24
+ EXPOSE 7860
25
+
26
+ # Application ko run karein
27
+ # Uvicorn ko 'app.py' mein maujood 'app' object ko host karna hai
28
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
29
+