nadish1210 commited on
Commit
9072b09
·
verified ·
1 Parent(s): d69438b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -14
Dockerfile CHANGED
@@ -1,18 +1,15 @@
1
  FROM python:3.10-slim
2
 
3
- # System dependencies install karein
4
- USER root
5
  RUN apt-get update && apt-get install -y \
6
- build-essential \
7
  git \
8
  ffmpeg \
9
  libsm6 \
10
  libxext6 \
11
  libgl1 \
12
- curl \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
- # User create karein
16
  RUN useradd -m -u 1000 user
17
  USER user
18
  ENV HOME=/home/user \
@@ -21,17 +18,13 @@ ENV HOME=/home/user \
21
 
22
  WORKDIR /app
23
 
24
- # Sabse pehle pip upgrade karein
25
- RUN pip install --no-cache-dir --upgrade pip setuptools wheel
26
-
27
- # Requirements install karein
28
  COPY --chown=user requirements.txt .
29
- RUN pip install --no-cache-dir -r requirements.txt
 
30
 
31
- # Baqi code copy karein
32
  COPY --chown=user . .
33
 
34
- # Hugging Face port
35
- EXPOSE 7860
36
-
37
  CMD ["python", "app.py"]
 
1
  FROM python:3.10-slim
2
 
3
+ # Install system dependencies
 
4
  RUN apt-get update && apt-get install -y \
 
5
  git \
6
  ffmpeg \
7
  libsm6 \
8
  libxext6 \
9
  libgl1 \
 
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
+ # Set up non-root user
13
  RUN useradd -m -u 1000 user
14
  USER user
15
  ENV HOME=/home/user \
 
18
 
19
  WORKDIR /app
20
 
21
+ # Install Python requirements
 
 
 
22
  COPY --chown=user requirements.txt .
23
+ RUN pip install --no-cache-dir --upgrade pip && \
24
+ pip install --no-cache-dir -r requirements.txt
25
 
26
+ # Copy the rest of the files
27
  COPY --chown=user . .
28
 
29
+ # Launch command
 
 
30
  CMD ["python", "app.py"]