Spaces:
Running
Running
Commit
Β·
f20e646
1
Parent(s):
d9a1306
neee
Browse files- 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"]
|