Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +4 -1
Dockerfile
CHANGED
|
@@ -8,6 +8,10 @@ RUN apt-get update && apt-get install -y \
|
|
| 8 |
g++ \
|
| 9 |
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
# Install Python packages
|
| 12 |
RUN pip install --no-cache-dir \
|
| 13 |
torch==2.1.2+cpu -f https://download.pytorch.org/whl/torch_stable.html \
|
|
@@ -22,7 +26,6 @@ RUN pip install --no-cache-dir \
|
|
| 22 |
# Configure cache
|
| 23 |
ENV TRANSFORMERS_CACHE="/cache/models"
|
| 24 |
ENV HF_DATASETS_CACHE="/cache/datasets"
|
| 25 |
-
RUN mkdir -p /cache/models /cache/datasets
|
| 26 |
|
| 27 |
WORKDIR /app
|
| 28 |
COPY . /app
|
|
|
|
| 8 |
g++ \
|
| 9 |
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
+
# Create cache directory with correct permissions
|
| 12 |
+
RUN mkdir -p /cache/models /cache/datasets && \
|
| 13 |
+
chmod -R 777 /cache # Full permissions for all users
|
| 14 |
+
|
| 15 |
# Install Python packages
|
| 16 |
RUN pip install --no-cache-dir \
|
| 17 |
torch==2.1.2+cpu -f https://download.pytorch.org/whl/torch_stable.html \
|
|
|
|
| 26 |
# Configure cache
|
| 27 |
ENV TRANSFORMERS_CACHE="/cache/models"
|
| 28 |
ENV HF_DATASETS_CACHE="/cache/datasets"
|
|
|
|
| 29 |
|
| 30 |
WORKDIR /app
|
| 31 |
COPY . /app
|