anyonehomep1mane commited on
Commit
8bb4749
·
1 Parent(s): 9919c9b

Latest Changes

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -4
Dockerfile CHANGED
@@ -14,10 +14,10 @@ RUN apt-get update && apt-get install -y \
14
 
15
  COPY requirements.txt .
16
 
17
- # Clean up existing pip packages before installation
18
- RUN pip freeze > packages.txt && \
19
- pip uninstall -r packages.txt -y && \
20
- rm packages.txt && \
21
  pip install --upgrade pip && \
22
  pip install --no-cache-dir -r requirements.txt
23
 
 
14
 
15
  COPY requirements.txt .
16
 
17
+ # Clean up existing pip packages (if any) before installation
18
+ RUN pip freeze > packages.txt 2>/dev/null || true && \
19
+ if [ -s packages.txt ]; then pip uninstall -r packages.txt -y; fi && \
20
+ rm -f packages.txt && \
21
  pip install --upgrade pip && \
22
  pip install --no-cache-dir -r requirements.txt
23