vadim71 commited on
Commit
56cf22e
·
verified ·
1 Parent(s): c157490

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -1
Dockerfile CHANGED
@@ -9,16 +9,27 @@ ENV DEBIAN_FRONTEND=noninteractive \
9
 
10
  WORKDIR /app
11
 
 
12
  RUN apt-get update && apt-get install -y --no-install-recommends \
13
  git ffmpeg \
14
  libgl1 libsm6 libxext6 \
 
 
 
 
 
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
  COPY requirements-full.txt /app/requirements-full.txt
18
- RUN pip install --upgrade pip && pip install -r /app/requirements-full.txt
 
 
 
 
19
 
20
  COPY . /app
21
 
 
22
  RUN python - << 'PY'
23
  import os, shutil
24
  from huggingface_hub import snapshot_download
@@ -49,6 +60,7 @@ for f in needed:
49
  print("[OK] buffalo_l copied to", dst)
50
  PY
51
 
 
52
  RUN test -f /app/inswapper_128.onnx && \
53
  test -f /app/GFPGANv1.3.pth && \
54
  test -f /root/.insightface/models/buffalo_l/w600k_r50.onnx && \
 
9
 
10
  WORKDIR /app
11
 
12
+ # + build tools because insightface may compile on this platform
13
  RUN apt-get update && apt-get install -y --no-install-recommends \
14
  git ffmpeg \
15
  libgl1 libsm6 libxext6 \
16
+ build-essential \
17
+ gcc g++ \
18
+ cmake \
19
+ pkg-config \
20
+ python3-dev \
21
  && rm -rf /var/lib/apt/lists/*
22
 
23
  COPY requirements-full.txt /app/requirements-full.txt
24
+
25
+ # Important: upgrade build tooling first
26
+ RUN pip install --upgrade pip setuptools wheel
27
+
28
+ RUN pip install -r /app/requirements-full.txt
29
 
30
  COPY . /app
31
 
32
+ # Download InsightFace buffalo_l ONNX files from HF DATASET (files in dataset root)
33
  RUN python - << 'PY'
34
  import os, shutil
35
  from huggingface_hub import snapshot_download
 
60
  print("[OK] buffalo_l copied to", dst)
61
  PY
62
 
63
+ # Hard checks
64
  RUN test -f /app/inswapper_128.onnx && \
65
  test -f /app/GFPGANv1.3.pth && \
66
  test -f /root/.insightface/models/buffalo_l/w600k_r50.onnx && \