Shio-Koube commited on
Commit
108dadc
·
verified ·
1 Parent(s): 5f695ef

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -10
Dockerfile CHANGED
@@ -1,21 +1,17 @@
1
- # Use NVIDIA PyTorch base (GPU). If CPU-only, use python:3.11-slim instead.
2
- FROM python:3.11-slim
3
 
4
- # Set working directory
5
- WORKDIR /
6
 
7
- RUN mkdir models && chmod 777 models/
8
-
9
- # Copy requirements and install dependencies
10
  COPY requirements.txt .
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
 
 
 
 
13
 
14
- # Copy the server code
15
  COPY . .
16
 
17
- # Expose FastAPI port
18
  EXPOSE 8080
19
 
20
- # Default command (can be overridden)
21
  CMD ["python", "server.py", "--model-repo", "SmilingWolf/wd-eva02-large-tagger-v3"]
 
1
+ FROM nvcr.io/nvidia/pytorch:24.06-py3
 
2
 
3
+ WORKDIR /app
 
4
 
 
 
 
5
  COPY requirements.txt .
6
  RUN pip install --no-cache-dir -r requirements.txt
7
 
8
+ # Fix: make models and cache dirs writable
9
+ RUN mkdir -p /app/models /app/.cache && chmod -R 777 /app/models /app/.cache
10
+
11
+ ENV HF_HOME=/app/.cache
12
 
 
13
  COPY . .
14
 
 
15
  EXPOSE 8080
16
 
 
17
  CMD ["python", "server.py", "--model-repo", "SmilingWolf/wd-eva02-large-tagger-v3"]