Singhp08 commited on
Commit
3ae9ad1
·
verified ·
1 Parent(s): 2e1a661

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -15
Dockerfile CHANGED
@@ -1,33 +1,27 @@
1
- # 1. Base Image: Python 3.10 slim version
2
  FROM python:3.10-slim
3
 
4
- # 2. System Level Dependencies (FFmpeg aur Wget zaroori hain)
5
  RUN apt-get update && apt-get install -y \
6
  ffmpeg \
7
- build-essential \
8
  wget \
 
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
- # 3. App Directory set karo
12
  WORKDIR /app
13
 
14
- # 4. Sabhi local files (app.py, requirements, models folder) copy karo
15
- # Isse teri 'models/elvish.index' file image ke andar chali jayegi
 
 
 
16
  COPY . .
17
 
18
- # 5. Models folder agar nahi hai toh banao
19
  RUN mkdir -p models
20
-
21
- # 6. GitHub Release se .pth file download karo (Directly models folder mein)
22
  RUN wget -q -O models/elvish.pth "https://github.com/pawan009-coder/Jagirdar--bot/releases/download/v1.0/elvish.pth"
23
 
24
- # 7. Pip update aur dependencies install karo
25
- RUN pip install "pip<24.1"
26
- RUN pip install --no-cache-dir -r requirements.txt
27
-
28
- # 8. HF Port expose karo
29
  ENV PORT=7860
30
  EXPOSE 7860
31
 
32
- # 9. Server start karo
33
  CMD ["python", "app.py"]
 
 
1
  FROM python:3.10-slim
2
 
3
+ # FFmpeg aur Wget zaroori hain
4
  RUN apt-get update && apt-get install -y \
5
  ffmpeg \
 
6
  wget \
7
+ build-essential \
8
  && rm -rf /var/lib/apt/lists/*
9
 
 
10
  WORKDIR /app
11
 
12
+ # Pehle requirements copy karke install karo (Fast build ke liye)
13
+ COPY requirements.txt .
14
+ RUN pip install --no-cache-dir -r requirements.txt
15
+
16
+ # Baki files copy karo
17
  COPY . .
18
 
19
+ # Models setup
20
  RUN mkdir -p models
 
 
21
  RUN wget -q -O models/elvish.pth "https://github.com/pawan009-coder/Jagirdar--bot/releases/download/v1.0/elvish.pth"
22
 
23
+ # Hugging Face environment
 
 
 
 
24
  ENV PORT=7860
25
  EXPOSE 7860
26
 
 
27
  CMD ["python", "app.py"]