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