vishalsh13 commited on
Commit
f7ab2c4
·
1 Parent(s): cef3a32
Files changed (1) hide show
  1. Dockerfile +7 -2
Dockerfile CHANGED
@@ -1,11 +1,16 @@
1
  FROM python:3.10-slim
 
2
  WORKDIR /app
3
  COPY requirements.txt /app/
4
  RUN pip install --no-cache-dir -r requirements.txt
5
  COPY . /app/
6
- RUN mkdir -p /app/uploads && chown -R 1000:1000 /app/uploads
7
 
8
- # Set HF_HOME to a writable directory *inside* your /app
 
 
 
 
 
9
  ENV HF_HOME=/app/.cache
10
 
11
  EXPOSE 7860
 
1
  FROM python:3.10-slim
2
+
3
  WORKDIR /app
4
  COPY requirements.txt /app/
5
  RUN pip install --no-cache-dir -r requirements.txt
6
  COPY . /app/
 
7
 
8
+ # Create both /app/uploads and /app/.cache, and set permissions
9
+ # Try chown first; if it fails, fall back to chmod (less secure)
10
+ RUN mkdir -p /app/uploads /app/.cache && \
11
+ chown -R 1000:1000 /app/uploads /app/.cache || \
12
+ chmod -R 777 /app/uploads /app/.cache
13
+
14
  ENV HF_HOME=/app/.cache
15
 
16
  EXPOSE 7860