nkubana0 commited on
Commit
137eb0b
Β·
1 Parent(s): 989e338

fix: install CPU-only torch via Dockerfile, fix requirements syntax

Browse files
Files changed (2) hide show
  1. Dockerfile +3 -0
  2. requirements.txt +1 -1
Dockerfile CHANGED
@@ -17,6 +17,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
17
  gcc \
18
  && rm -rf /var/lib/apt/lists/*
19
 
 
 
 
20
  # Install requirements
21
  COPY requirements.txt .
22
  RUN pip install --no-cache-dir -r requirements.txt
 
17
  gcc \
18
  && rm -rf /var/lib/apt/lists/*
19
 
20
+ # Install CPU-only PyTorch first (avoids downloading 2GB GPU build)
21
+ RUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu
22
+
23
  # Install requirements
24
  COPY requirements.txt .
25
  RUN pip install --no-cache-dir -r requirements.txt
requirements.txt CHANGED
@@ -15,7 +15,7 @@ opencv-python-headless==4.8.1.78
15
  # ── ML / NLP ───────────────────────────────────────────────────────────────────
16
  numpy==1.26.4 # Fix for version 2.0 compatibility issues
17
  Pillow==11.3.0
18
- torch>=2.2.2 --index-url https://download.pytorch.org/whl/cpu
19
  transformers>=4.40.0 # HuggingFace Transformers (BERT, DeBERTa, FLAN-T5)
20
  sentencepiece>=0.1.99 # Required for T5Tokenizer
21
  accelerate>=0.27.0
 
15
  # ── ML / NLP ───────────────────────────────────────────────────────────────────
16
  numpy==1.26.4 # Fix for version 2.0 compatibility issues
17
  Pillow==11.3.0
18
+ torch>=2.2.2
19
  transformers>=4.40.0 # HuggingFace Transformers (BERT, DeBERTa, FLAN-T5)
20
  sentencepiece>=0.1.99 # Required for T5Tokenizer
21
  accelerate>=0.27.0