Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +5 -1
Dockerfile
CHANGED
|
@@ -1,12 +1,16 @@
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
|
|
|
|
|
|
|
|
|
| 3 |
ENV TRANSFORMERS_CACHE=/cache
|
| 4 |
ENV HUGGINGFACE_HUB_CACHE=/cache
|
|
|
|
| 5 |
|
| 6 |
WORKDIR /app
|
| 7 |
|
| 8 |
COPY requirements.txt .
|
| 9 |
-
RUN pip install -r requirements.txt
|
| 10 |
|
| 11 |
COPY . .
|
| 12 |
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
+
# Create and set permissions for the cache directory
|
| 4 |
+
RUN mkdir -p /cache && chmod -R 777 /cache
|
| 5 |
+
|
| 6 |
ENV TRANSFORMERS_CACHE=/cache
|
| 7 |
ENV HUGGINGFACE_HUB_CACHE=/cache
|
| 8 |
+
ENV HF_HOME=/cache
|
| 9 |
|
| 10 |
WORKDIR /app
|
| 11 |
|
| 12 |
COPY requirements.txt .
|
| 13 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
|
| 15 |
COPY . .
|
| 16 |
|