Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +6 -6
Dockerfile
CHANGED
|
@@ -1,15 +1,15 @@
|
|
| 1 |
# Base image
|
| 2 |
FROM python:3.9
|
| 3 |
|
| 4 |
-
# Set
|
| 5 |
-
|
| 6 |
-
ENV FONTCONFIG_PATH=/tmp/fontconfig
|
| 7 |
|
| 8 |
-
# Create directories and
|
| 9 |
RUN mkdir -p /tmp/matplotlib_cache /tmp/fontconfig && chmod -R 777 /tmp/matplotlib_cache /tmp/fontconfig
|
| 10 |
|
| 11 |
-
# Set
|
| 12 |
-
|
|
|
|
| 13 |
|
| 14 |
# Copy the dependencies file to the working directory
|
| 15 |
COPY ./requirements.txt /code/requirements.txt
|
|
|
|
| 1 |
# Base image
|
| 2 |
FROM python:3.9
|
| 3 |
|
| 4 |
+
# Set the working directory inside the container
|
| 5 |
+
WORKDIR /code
|
|
|
|
| 6 |
|
| 7 |
+
# Create directories for Matplotlib and Fontconfig caches
|
| 8 |
RUN mkdir -p /tmp/matplotlib_cache /tmp/fontconfig && chmod -R 777 /tmp/matplotlib_cache /tmp/fontconfig
|
| 9 |
|
| 10 |
+
# Set environment variables for caches
|
| 11 |
+
ENV MPLCONFIGDIR=/tmp/matplotlib_cache
|
| 12 |
+
ENV FONTCONFIG_PATH=/tmp/fontconfig
|
| 13 |
|
| 14 |
# Copy the dependencies file to the working directory
|
| 15 |
COPY ./requirements.txt /code/requirements.txt
|