fix: align dependency versions with FaceFusion 3.5.3 and fix GPU build
- Update onnxruntime to 1.24.1, numpy to 2.2.1, opencv-python to 4.13.0.92, scipy to 1.17.0, onnx to 1.20.1 to match facefusion/requirements.txt - GPU Dockerfile: install Python 3.12 from deadsnakes PPA since CUDA base image ships Python 3.10 which is too old for onnxruntime-gpu 1.24.1 - Copy both requirements files in COPY step so -r reference resolves Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
19
Dockerfile
19
Dockerfile
@@ -7,20 +7,29 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
ffmpeg curl libgl1-mesa-glx libglib2.0-0 \
|
ffmpeg curl libgl1-mesa-glx libglib2.0-0 \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY requirements-cpu.txt /tmp/requirements.txt
|
COPY requirements-cpu.txt /tmp/requirements-cpu.txt
|
||||||
RUN pip install --no-cache-dir -r /tmp/requirements.txt && rm /tmp/requirements.txt
|
COPY requirements.txt /tmp/requirements.txt
|
||||||
|
RUN pip install --no-cache-dir -r /tmp/requirements-cpu.txt && rm /tmp/requirements*.txt
|
||||||
|
|
||||||
# ---- GPU base ----
|
# ---- GPU base ----
|
||||||
FROM nvidia/cuda:12.4.1-cudnn-runtime-ubuntu22.04 AS base-gpu
|
FROM nvidia/cuda:12.4.1-cudnn-runtime-ubuntu22.04 AS base-gpu
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
python3 python3-pip python3-venv \
|
software-properties-common \
|
||||||
|
&& add-apt-repository ppa:deadsnakes/ppa \
|
||||||
|
&& apt-get update \
|
||||||
|
&& apt-get install -y --no-install-recommends \
|
||||||
|
python3.12 python3.12-venv python3.12-dev \
|
||||||
ffmpeg curl libgl1-mesa-glx libglib2.0-0 \
|
ffmpeg curl libgl1-mesa-glx libglib2.0-0 \
|
||||||
|
&& ln -sf /usr/bin/python3.12 /usr/bin/python3 \
|
||||||
&& ln -sf /usr/bin/python3 /usr/bin/python \
|
&& ln -sf /usr/bin/python3 /usr/bin/python \
|
||||||
|
&& python3 -m ensurepip --upgrade \
|
||||||
|
&& python3 -m pip install --no-cache-dir --upgrade pip \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY requirements-gpu.txt /tmp/requirements.txt
|
COPY requirements-gpu.txt /tmp/requirements-gpu.txt
|
||||||
RUN pip install --no-cache-dir --break-system-packages -r /tmp/requirements.txt && rm /tmp/requirements.txt
|
COPY requirements.txt /tmp/requirements.txt
|
||||||
|
RUN pip install --no-cache-dir -r /tmp/requirements-gpu.txt && rm /tmp/requirements*.txt
|
||||||
|
|
||||||
# ---- Final stage ----
|
# ---- Final stage ----
|
||||||
FROM base-${VARIANT} AS final
|
FROM base-${VARIANT} AS final
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
-r requirements.txt
|
-r requirements.txt
|
||||||
onnxruntime==1.20.1
|
onnxruntime==1.24.1
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
-r requirements.txt
|
-r requirements.txt
|
||||||
onnxruntime-gpu==1.20.1
|
onnxruntime-gpu==1.24.1
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ python-multipart==0.0.18
|
|||||||
pydantic-settings==2.7.1
|
pydantic-settings==2.7.1
|
||||||
psutil==6.1.1
|
psutil==6.1.1
|
||||||
|
|
||||||
# FaceFusion dependencies (excluding gradio)
|
# FaceFusion dependencies (matching facefusion/requirements.txt, excluding gradio)
|
||||||
numpy==1.26.4
|
numpy==2.2.1
|
||||||
opencv-python==4.10.0.84
|
opencv-python==4.13.0.92
|
||||||
onnx==1.17.0
|
onnx==1.20.1
|
||||||
scipy==1.14.1
|
scipy==1.17.0
|
||||||
tqdm==4.67.1
|
tqdm==4.67.3
|
||||||
|
|||||||
Reference in New Issue
Block a user