feat: remove gpu support and simplify to cpu-only
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m13s
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m13s
This commit is contained in:
31
Dockerfile
31
Dockerfile
@@ -1,7 +1,5 @@
|
||||
ARG VARIANT=cpu
|
||||
|
||||
# ---- CPU base ----
|
||||
FROM python:3.12-slim AS base-cpu
|
||||
# ---- Final stage ----
|
||||
FROM python:3.12-slim
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ffmpeg curl libgl1 libglib2.0-0 \
|
||||
@@ -11,31 +9,6 @@ COPY requirements-cpu.txt /tmp/requirements-cpu.txt
|
||||
COPY requirements.txt /tmp/requirements.txt
|
||||
RUN pip install --no-cache-dir -r /tmp/requirements-cpu.txt && rm /tmp/requirements*.txt
|
||||
|
||||
# ---- GPU base ----
|
||||
FROM nvidia/cuda:12.4.1-cudnn-runtime-ubuntu22.04 AS base-gpu
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
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 libglib2.0-0 \
|
||||
&& ln -sf /usr/bin/python3.12 /usr/bin/python3 \
|
||||
&& 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/*
|
||||
|
||||
COPY requirements-gpu.txt /tmp/requirements-gpu.txt
|
||||
COPY requirements.txt /tmp/requirements.txt
|
||||
RUN pip install --no-cache-dir -r /tmp/requirements-gpu.txt && rm /tmp/requirements*.txt
|
||||
|
||||
# ---- Final stage ----
|
||||
FROM base-${VARIANT} AS final
|
||||
|
||||
# CWD must be the FaceFusion submodule root so resolve_file_paths('facefusion/...')
|
||||
# resolves correctly (FaceFusion uses relative paths from CWD internally)
|
||||
WORKDIR /app/facefusion-src
|
||||
|
||||
Reference in New Issue
Block a user