cxeep commited on
Commit
8f9049b
·
verified ·
1 Parent(s): 6e5c8e2

add cache env

Browse files
Files changed (1) hide show
  1. 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