davidtran999 commited on
Commit
dec9146
·
verified ·
1 Parent(s): f5006b2

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -1
Dockerfile CHANGED
@@ -21,13 +21,16 @@ RUN apt-get update && \
21
  COPY backend/requirements.txt /app/requirements.txt
22
  # Install CPU-only torch first (much smaller, no CUDA dependencies)
23
  # This avoids downloading 2GB+ of CUDA packages on CPU-only environments
 
24
  RUN pip install --upgrade pip && \
25
  pip install --no-cache-dir torch==2.0.0 --index-url https://download.pytorch.org/whl/cpu && \
 
26
  pip install --no-cache-dir --upgrade --force-reinstall \
27
  "transformers>=4.50.0,<5.0.0" \
28
  "sentence-transformers>=2.2.0" \
29
  "FlagEmbedding>=1.2.0" && \
30
- pip install --no-cache-dir -r requirements.txt
 
31
 
32
  COPY backend /app
33
 
 
21
  COPY backend/requirements.txt /app/requirements.txt
22
  # Install CPU-only torch first (much smaller, no CUDA dependencies)
23
  # This avoids downloading 2GB+ of CUDA packages on CPU-only environments
24
+ # CRITICAL: Install transformers>=4.50.0 BEFORE other packages to avoid conflicts
25
  RUN pip install --upgrade pip && \
26
  pip install --no-cache-dir torch==2.0.0 --index-url https://download.pytorch.org/whl/cpu && \
27
+ pip uninstall -y transformers || true && \
28
  pip install --no-cache-dir --upgrade --force-reinstall \
29
  "transformers>=4.50.0,<5.0.0" \
30
  "sentence-transformers>=2.2.0" \
31
  "FlagEmbedding>=1.2.0" && \
32
+ pip install --no-cache-dir -r requirements.txt && \
33
+ pip show transformers | grep Version
34
 
35
  COPY backend /app
36