Spaces:
Sleeping
Sleeping
add cache env
Browse files- Dockerfile +7 -0
Dockerfile
CHANGED
@@ -47,6 +47,13 @@ RUN mkdir -p pretrained && \
|
|
47 |
# Add volume mount points for input and output files
|
48 |
VOLUME ["/app/input", "/app/output"]
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
CMD ["python", "webui.py", "--work_dir", "pretrained", "--addr", "0.0.0.0", "--port", "7860"]
|
51 |
|
52 |
# # Set entrypoint to run inference
|
|
|
47 |
# Add volume mount points for input and output files
|
48 |
VOLUME ["/app/input", "/app/output"]
|
49 |
|
50 |
+
# Create a directory for caches and make it writable
|
51 |
+
RUN mkdir -p /app/cache && chmod -R 777 /app/cache
|
52 |
+
|
53 |
+
# Set environment variables to point to this new directory
|
54 |
+
ENV NUMBA_CACHE_DIR=/app/cache/numba_cache
|
55 |
+
ENV MPLCONFIGDIR=/app/cache/matplotlib_cache
|
56 |
+
|
57 |
CMD ["python", "webui.py", "--work_dir", "pretrained", "--addr", "0.0.0.0", "--port", "7860"]
|
58 |
|
59 |
# # Set entrypoint to run inference
|