Docker部署Facefusion
环境
windows10
Facefusion3.1.2
安装
拉取源代码
git clone https://github.com/facefusion/facefusion-docker.git
此处如果拉不下来,需要科学上网,不会的可以找我。
运行容器
- 将
Dockerfile.cpu
文件中的的From python:3.12
改成:
FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/library/python:3.12
- 在
Dockerfile.cpu
文件中添加代理,此处端口得换成自己的代理的端口:
ENV HTTP_PROXY=http://host.docker.internal:7890
ENV HTTPS_PROXY=http://host.docker.internal:7890
- 如果按照上一步添加了代理,则在
docker-compose.cpu
文件中添加以下行,否则不需要:
environment:- no_proxy=localhost,127.0.0.1,::1
以大家都有的CPU举例,CPU也能玩,只不过慢了点,运行cpu容器:
Run the CPU
container:
docker compose -f docker-compose.cpu.yml up
Run the CUDA
container:
docker compose -f docker-compose.cuda.yml up
Run the TensorRT
container:
docker compose -f docker-compose.tensorrt.yml up
Run the ROCm
container:
docker compose -f docker-compose.rocm.yml up
使用
打开浏览器,在浏览器中按照启动方式输入以下网址,因为我们是以cpu启动的,所以端口是7865
Browse the CPU
container:
http://localhost:7865
Browse the CUDA
container:
http://localhost:7870
Browse the TensorRT
container:
http://localhost:7875
Browse the ROCm
container:
http://localhost:7880