1.安装Iopaint
pip3安装Iopaint
1 | pip3 install iopaint |
直接命令行测试启动
1 | iopaint start --model=lama --device=cpu --port=8080 |
启动的时候会默认下载模型
如果下载不了,可以自己用魔法下载再上传到默认的目录
文件名为big-lama.pt
1 | /root/.cache/torch/hub/checkpoints |
启动成功后网页端会监听本地的8080端口
2.创建systemd服务
1 | vim /etc/systemd/system/iopaint.service |
配置文件
1 | [Unit] |
启动服务
1 | sudo systemctl daemon-reload |
查看状态
1 | sudo systemctl status iopaint |
如果启动失败,监听日志
1 | journalctl -u iopaint -xe -f |