inference
inference copied to clipboard
xinference-local centos下如何设置后台启动例如:(-d)
xinference-local --host 0.0.0.0 --port 8888 centos下如何设置后台启动(-d),我看xinference-local --help没有提供相应的说明参数
目前只能用 nohup,后台启动我们会在未来规划。
也可以通过 systemd 管理启动,步骤如下:
# 利用 systemd 管理服务并后台启动
# 查找 xinference-local 实际位置
sudo find / -name xinference-local 2>/dev/null
# xinference-local 位置
/home/tester/.local/bin/xinference-local
# 创建 systemd 服务文件
sudo vim /etc/systemd/system/xinference.service
# 写入内容,替换 User 和 Group 为你的 Linux 系统中合适的用户名和用户组,确保该用户有足够的权限运行服务。
[Unit]
Description=Xinference Local Service
After=network.target
[Service]
ExecStart=/home/tester/.local/bin/xinference-local --host 0.0.0.0 --port 9997
Restart=always
User=用户名
Group=用户组
[Install]
WantedBy=multi-user.target
# 重新加载 systemd 并启动,设置它为开机自启
sudo systemctl daemon-reload
sudo systemctl enable xinference.service
sudo systemctl start xinference.service
# 检查服务的状态
sudo systemctl status xinference.service
# 如果服务没有正常运行,查看服务的日志来诊断问题
sudo journalctl -u xinference.service
关键是重启后已经 运行的model 需要重新加载
This issue is stale because it has been open for 7 days with no activity.
This issue was closed because it has been inactive for 5 days since being marked as stale.