Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +8 -4
Dockerfile
CHANGED
|
@@ -10,9 +10,16 @@ ENV PYTHONUNBUFFERED 1
|
|
| 10 |
#ENV PATH="/home/user/.local/bin:$PATH"
|
| 11 |
#ENV HF_HOME="/app/.cache/huggingface"
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
ENV TRANSFORMERS_CACHE=/app/.cache/huggingface
|
| 14 |
ENV HF_HOME=/app/.cache/huggingface
|
| 15 |
-
ENV MPLCONFIGDIR=/app/.cache/
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
# Set the working directory
|
| 18 |
WORKDIR /app
|
|
@@ -40,9 +47,6 @@ RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
|
| 40 |
# Create directories for session storage, uploads, and cache
|
| 41 |
RUN mkdir -p /app/flask_sessions /app/uploads /tmp/matplotlib /tmp/transformers_cache && chmod -R 777 /app/flask_sessions /app/uploads /tmp/matplotlib /tmp/transformers_cache
|
| 42 |
|
| 43 |
-
#hugging Face
|
| 44 |
-
RUN mkdir -p /app/.cache/huggingface /app/.cache/matplotlib
|
| 45 |
-
|
| 46 |
# Copy the rest of the application code to /app
|
| 47 |
COPY . /app/
|
| 48 |
|
|
|
|
| 10 |
#ENV PATH="/home/user/.local/bin:$PATH"
|
| 11 |
#ENV HF_HOME="/app/.cache/huggingface"
|
| 12 |
|
| 13 |
+
# Create cache directories
|
| 14 |
+
RUN mkdir -p /app/.cache/huggingface /app/.cache/matplotlib
|
| 15 |
+
|
| 16 |
+
# Set environment variables for Hugging Face and Matplotlib cache
|
| 17 |
ENV TRANSFORMERS_CACHE=/app/.cache/huggingface
|
| 18 |
ENV HF_HOME=/app/.cache/huggingface
|
| 19 |
+
ENV MPLCONFIGDIR=/app/.cache/matplotlib
|
| 20 |
+
|
| 21 |
+
# Adding permission for the cache
|
| 22 |
+
RUN chmod -R 777 /app/.cache
|
| 23 |
|
| 24 |
# Set the working directory
|
| 25 |
WORKDIR /app
|
|
|
|
| 47 |
# Create directories for session storage, uploads, and cache
|
| 48 |
RUN mkdir -p /app/flask_sessions /app/uploads /tmp/matplotlib /tmp/transformers_cache && chmod -R 777 /app/flask_sessions /app/uploads /tmp/matplotlib /tmp/transformers_cache
|
| 49 |
|
|
|
|
|
|
|
|
|
|
| 50 |
# Copy the rest of the application code to /app
|
| 51 |
COPY . /app/
|
| 52 |
|