✅ 推荐方案
CentOS + Docker(Ubuntu 镜像) 安装 GeneFace++
这是最稳、最省时间的方式。
❌ 不推荐
直接在 CentOS 裸机装(依赖冲突、gcc、CUDA、ffmpeg 很折腾)
cat /etc/centos-releasesudo yum install -y \
git wget curl unzip \
gcc gcc-c++ make \
epel-releasesudo yum install -y docker
sudo systemctl start docker
sudo systemctl enable docker验证:
docker --versiondocker run -it --gpus all \
-v /your/data:/workspace \
pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime \
bash如果你还没装 NVIDIA Container Toolkit,先装:
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.repo | sudo tee /etc/yum.repos.d/nvidia-docker.repo
sudo yum install -y nvidia-container-toolkit
sudo systemctl restart dockergit clone https://github.com/yerfor/GeneFacePlusPlus.git
cd GeneFacePlusPlusconda create -n geneface python=3.8 -y
conda activate genefacepip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 \
-f https://download.pytorch.org/whl/torch_stable.htmlpip install -r requirements.txt常见问题:
pytorch3d 编译失败✅ 解决:
pip install "git+https://github.com/facebookresearch/pytorch3d.git"libstdc++.so 报错✅ 解决(CentOS 常见):
conda install -c conda-forge libstdcxx-ngsudo apt update
sudo apt install -y \
ffmpeg \
libsndfile1 \
libgl1-mesa-glx \
libglib2.0-0GeneFace++ 需要:
根据官方 README:
bash scripts/download_pretrained_models.shpython inference.py \
--audio_path test/audio.wav \
--out_path output.mp4⚠️ 风险点:
| 问题 | 原因 |
|---|---|
| gcc 版本太低 | CentOS 7 默认 gcc 4.8 |
| ffmpeg 缺库 | 需要源码编译 |
| CUDA 驱动冲突 | CentOS 内核老 |
| pytorch3d 编译失败 | 工具链不兼容 |
✅ 最低要求:
✅ 第一选择:
CentOS + Docker + Ubuntu 20.04 + CUDA
✅ 第二选择:
CentOS + Conda + 手动编译(适合服务器已有环境)
✅ 不推荐:
CentOS 7 裸机直接装
你可以直接告诉我:
我可以: