rexprimematrix commited on
Commit
fea8413
·
verified ·
1 Parent(s): 7e00165

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -8
Dockerfile CHANGED
@@ -1,27 +1,25 @@
1
  FROM python:3.10-slim
2
 
3
- # Root user bankar base system tools install karna
4
- USER root
 
5
  RUN apt-get update && apt-get install -y \
6
  build-essential \
7
  python3-dev \
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
- # Hugging Face requires UID 1000 user
11
  RUN useradd -m -u 1000 user
12
  USER user
13
  ENV PATH="/home/user/.local/bin:$PATH"
14
 
15
- WORKDIR /app
16
-
17
- # Requirements copy karke safe mode mein install karna
18
  COPY --chown=user requirements.txt .
 
 
19
  RUN pip install --no-cache-dir -r requirements.txt
20
 
21
- # Baaki code copy karna
22
  COPY --chown=user . .
23
 
24
- # HF Space port
25
  EXPOSE 7860
26
 
27
  CMD ["python", "brain.py"]
 
1
  FROM python:3.10-slim
2
 
3
+ WORKDIR /app
4
+
5
+ # System dependencies install karna
6
  RUN apt-get update && apt-get install -y \
7
  build-essential \
8
  python3-dev \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
+ # Hugging Face User Setup
12
  RUN useradd -m -u 1000 user
13
  USER user
14
  ENV PATH="/home/user/.local/bin:$PATH"
15
 
 
 
 
16
  COPY --chown=user requirements.txt .
17
+
18
+ # Pre-built wheel ko priority dena
19
  RUN pip install --no-cache-dir -r requirements.txt
20
 
 
21
  COPY --chown=user . .
22
 
 
23
  EXPOSE 7860
24
 
25
  CMD ["python", "brain.py"]