dosesnrolls1 commited on
Commit
170e967
·
verified ·
1 Parent(s): 5605fa6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -11
Dockerfile CHANGED
@@ -1,20 +1,27 @@
1
- FROM nvidia/cuda:12.1.0-runtime-ubuntu22.04
2
 
3
- # Install system dependencies
4
  RUN apt-get update && apt-get install -y \
5
  python3.10 python3-pip git ffmpeg \
6
  && rm -rf /var/lib/apt/lists/*
7
 
8
  WORKDIR /app
 
9
 
10
- # Copy requirements and install
11
- COPY requirements.txt .
12
- RUN pip install --no-cache-dir -r requirements.txt
13
-
14
- # Force clean onnxruntime-gpu install
15
- RUN pip uninstall -y onnxruntime onnxruntime-gpu && \
16
- pip install onnxruntime-gpu
17
 
18
- COPY . .
 
 
 
 
 
 
 
19
 
20
- CMD ["python3", "app.py"]
 
1
+ FROM nvidia/cuda:12.1.1-cudnn9-runtime-ubuntu22.04
2
 
3
+ # Install system deps
4
  RUN apt-get update && apt-get install -y \
5
  python3.10 python3-pip git ffmpeg \
6
  && rm -rf /var/lib/apt/lists/*
7
 
8
  WORKDIR /app
9
+ COPY . .
10
 
11
+ RUN pip install --no-cache-dir \
12
+ gradio \
13
+ insightface==0.7.3 \
14
+ onnxruntime-gpu==1.18.0 \
15
+ opencv-python-headless \
16
+ numpy
 
17
 
18
+ # Pre-download models
19
+ RUN python -c "
20
+ import insightface
21
+ from insightface.app import FaceAnalysis
22
+ app = FaceAnalysis(name='buffalo_l', providers=['CUDAExecutionProvider'])
23
+ app.prepare(ctx_id=0, det_size=(640, 640))
24
+ print('Models ready')
25
+ "
26
 
27
+ CMD ["python", "app.py"]