dopami9 commited on
Commit
45a7fc9
·
verified ·
1 Parent(s): 085c0a9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -3
Dockerfile CHANGED
@@ -1,20 +1,31 @@
 
 
1
 
2
- FROM python:3.9-slim
3
-
4
  WORKDIR /app
5
 
 
 
 
 
 
6
  COPY requirements.txt requirements.txt
7
 
 
8
  RUN pip install --no-cache-dir --upgrade pip && \
9
- pip install --no-cache-dir -r requirements.txt
10
 
 
11
  COPY . .
12
 
 
13
  RUN useradd -m -u 1000 user
14
  USER user
15
  ENV HOME=/home/user \
16
  PATH=/home/user/.local/bin:$PATH
17
 
 
18
  EXPOSE 7860
19
 
 
20
  CMD ["python", "app.py"]
 
1
+ # Start light
2
+ FROM python:3.10-slim
3
 
4
+ # Set working directory
 
5
  WORKDIR /app
6
 
7
+ # --- CACHE BUSTER ---
8
+ # Changing this line forces Docker to ignore the cache and re-install everything
9
+ ENV CACHEBUSTER=2026-02-07
10
+
11
+ # Copy requirements
12
  COPY requirements.txt requirements.txt
13
 
14
+ # Install dependencies (Force upgrade everything)
15
  RUN pip install --no-cache-dir --upgrade pip && \
16
+ pip install --no-cache-dir --upgrade -r requirements.txt
17
 
18
+ # Copy the app
19
  COPY . .
20
 
21
+ # Create user (Security)
22
  RUN useradd -m -u 1000 user
23
  USER user
24
  ENV HOME=/home/user \
25
  PATH=/home/user/.local/bin:$PATH
26
 
27
+ # Expose port
28
  EXPOSE 7860
29
 
30
+ # Run it
31
  CMD ["python", "app.py"]