Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +6 -3
Dockerfile
CHANGED
|
@@ -5,10 +5,13 @@ FROM python:3.9-slim
|
|
| 5 |
# Set the working directory in the container
|
| 6 |
WORKDIR /app
|
| 7 |
|
| 8 |
-
# --- START OF FIX ---
|
| 9 |
-
# Set
|
| 10 |
ENV HF_HOME=/app/cache
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
# Copy the requirements file into the container at /app
|
| 14 |
COPY requirements.txt .
|
|
|
|
| 5 |
# Set the working directory in the container
|
| 6 |
WORKDIR /app
|
| 7 |
|
| 8 |
+
# --- START OF FINAL FIX ---
|
| 9 |
+
# 1. Set the environment variable for the cache location
|
| 10 |
ENV HF_HOME=/app/cache
|
| 11 |
+
|
| 12 |
+
# 2. Create the cache directory AND give it full write permissions during the build process
|
| 13 |
+
RUN mkdir -p /app/cache && chmod -R 777 /app/cache
|
| 14 |
+
# --- END OF FINAL FIX ---
|
| 15 |
|
| 16 |
# Copy the requirements file into the container at /app
|
| 17 |
COPY requirements.txt .
|