Spaces:
Sleeping
Sleeping
WebashalarForML
commited on
Commit
•
a9fec65
1
Parent(s):
ef3d157
Update Dockerfile
Browse files- Dockerfile +8 -1
Dockerfile
CHANGED
@@ -20,6 +20,10 @@ RUN apt-get update && apt-get install -y \
|
|
20 |
libglib2.0-0 \
|
21 |
&& rm -rf /var/lib/apt/lists/*
|
22 |
|
|
|
|
|
|
|
|
|
23 |
# Copy the requirements file into the container at /app
|
24 |
COPY requirements.txt /app/
|
25 |
|
@@ -27,7 +31,10 @@ COPY requirements.txt /app/
|
|
27 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
28 |
|
29 |
# Create directories for session storage and uploads
|
30 |
-
RUN mkdir -p /app/flask_sessions /app/uploads && chmod -R 777 /app/flask_sessions /app/uploads
|
|
|
|
|
|
|
31 |
|
32 |
# Copy the rest of the application code to /app
|
33 |
COPY . /app/
|
|
|
20 |
libglib2.0-0 \
|
21 |
&& rm -rf /var/lib/apt/lists/*
|
22 |
|
23 |
+
# Set environment variables for Huggingface and Matplotlib cache directories
|
24 |
+
ENV MPLCONFIGDIR=/tmp/matplotlib
|
25 |
+
ENV TRANSFORMERS_CACHE=/tmp/transformers_cache
|
26 |
+
|
27 |
# Copy the requirements file into the container at /app
|
28 |
COPY requirements.txt /app/
|
29 |
|
|
|
31 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
32 |
|
33 |
# Create directories for session storage and uploads
|
34 |
+
#RUN mkdir -p /app/flask_sessions /app/uploads && chmod -R 777 /app/flask_sessions /app/uploads
|
35 |
+
|
36 |
+
# Create directories for session storage, uploads, and cache
|
37 |
+
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
|
38 |
|
39 |
# Copy the rest of the application code to /app
|
40 |
COPY . /app/
|