kavin57447 commited on
Commit
ee0ba57
·
1 Parent(s): 0eef0af

Fix permission: mkdir after COPY, chmod /app

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -4
Dockerfile CHANGED
@@ -10,7 +10,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
10
  # Writable dirs for matplotlib and HF cache
11
  ENV MPLCONFIGDIR=/tmp/matplotlib
12
  ENV HF_HOME=/tmp/hf_cache
13
- RUN mkdir -p /tmp/matplotlib /tmp/hf_cache
14
 
15
  # Python deps
16
  COPY requirements.txt .
@@ -19,9 +18,9 @@ RUN pip install --no-cache-dir -r requirements.txt
19
  # App code
20
  COPY . .
21
 
22
- # Writable dirs for outputs
23
- RUN mkdir -p /app/models /app/outputs /app/logs /app/eval_logs && \
24
- chmod -R 777 /app/models /app/outputs /app/logs /app/eval_logs /tmp/matplotlib /tmp/hf_cache
25
 
26
  EXPOSE 7860
27
 
 
10
  # Writable dirs for matplotlib and HF cache
11
  ENV MPLCONFIGDIR=/tmp/matplotlib
12
  ENV HF_HOME=/tmp/hf_cache
 
13
 
14
  # Python deps
15
  COPY requirements.txt .
 
18
  # App code
19
  COPY . .
20
 
21
+ # Create writable dirs AFTER copy
22
+ RUN mkdir -p /app/models /app/outputs /app/logs /app/eval_logs /tmp/matplotlib /tmp/hf_cache && \
23
+ chmod -R 777 /app/models /app/outputs /app/logs /app/eval_logs /tmp/matplotlib /tmp/hf_cache /app
24
 
25
  EXPOSE 7860
26