Spaces:
Sleeping
Sleeping
Update your Dockerfile to include an ENV directive that ensures the Hugging Face cache directory is writable
Browse files- Dockerfile +6 -0
Dockerfile
CHANGED
@@ -10,6 +10,12 @@ COPY . .
|
|
10 |
# Install Python dependencies
|
11 |
RUN pip install --no-cache-dir -r requirements.txt
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
# Expose the port your app will run on
|
14 |
EXPOSE 7860
|
15 |
|
|
|
10 |
# Install Python dependencies
|
11 |
RUN pip install --no-cache-dir -r requirements.txt
|
12 |
|
13 |
+
# Create a writable cache directory for Hugging Face models
|
14 |
+
RUN mkdir -p /app/.cache && chmod -R 777 /app/.cache
|
15 |
+
|
16 |
+
# Set an environment variable for the cache directory
|
17 |
+
ENV TRANSFORMERS_CACHE=/app/.cache
|
18 |
+
|
19 |
# Expose the port your app will run on
|
20 |
EXPOSE 7860
|
21 |
|