Syncbuz120 commited on
Commit
f20e646
Β·
1 Parent(s): d9a1306
Files changed (1) hide show
  1. Dockerfile +4 -1
Dockerfile CHANGED
@@ -14,6 +14,9 @@ RUN pip install --no-cache-dir --upgrade pip
14
  RUN pip install --no-cache-dir -r requirements.txt
15
  RUN pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
16
 
 
 
 
17
  # βœ… Set environment variables to a writable path
18
  ENV HF_HOME=/app/cache
19
  ENV TRANSFORMERS_CACHE=/app/cache
@@ -38,4 +41,4 @@ RUN chmod -R 777 /app/cache
38
  EXPOSE 7860
39
 
40
  # βœ… Run app
41
- CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "1", "--timeout", "120", "app:app"]
 
14
  RUN pip install --no-cache-dir -r requirements.txt
15
  RUN pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
16
 
17
+ # βœ… Install accelerate (fixes distilgpt2 loading with device_map)
18
+ RUN pip install --no-cache-dir accelerate
19
+
20
  # βœ… Set environment variables to a writable path
21
  ENV HF_HOME=/app/cache
22
  ENV TRANSFORMERS_CACHE=/app/cache
 
41
  EXPOSE 7860
42
 
43
  # βœ… Run app
44
+ CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "1", "--timeout", "120", "app:app"]