Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

服务Docker重启之后,如何恢复之前运行的模型 #1431

Open
yeyupiaoling opened this issue May 7, 2024 · 6 comments
Open

服务Docker重启之后,如何恢复之前运行的模型 #1431

yeyupiaoling opened this issue May 7, 2024 · 6 comments
Labels
question Further information is requested
Milestone

Comments

@yeyupiaoling
Copy link

  • Docker
  • Xinference 0.10.3

服务Docker重启之后,如何恢复之前运行的模型。
我这边的每次重启docker之后,还需要手动启动模型才会运行模型。
有没有设置可以在docker恢复启动之后,自动运行之前运行的模型?

@yeyupiaoling yeyupiaoling added the question Further information is requested label May 7, 2024
@XprobeBot XprobeBot added this to the v0.11.0 milestone May 7, 2024
@mikeshi80
Copy link
Contributor

你需要在那个Docker镜像的基础上,手动修改entrypoint脚本,加上xinference命令,让其加载你要的模型。

@XprobeBot XprobeBot modified the milestones: v0.11.0, v0.11.1 May 11, 2024
@WangxuP
Copy link

WangxuP commented May 17, 2024

启动docker的时候,设置xinference的环境变量 XINFERENCE_HOME,然后将环境变量的目录再做个映射。

docker run -v /home/models/:/home/models/ -v /nfs/models/xinference/xinference_cache/:/root/xinference_cache -e XINFERENCE_MODEL_SRC=modelscope -e XINFERENCE_HOME=/root/xinference_cache -d -p 9998:9997 --gpus all --name ffff --shm-size=256g xprobe/xinference:v0.10.1 xinference-local -H 0.0.0.0 --log-level debug

@XprobeBot XprobeBot modified the milestones: v0.11.1, v0.11.2 May 17, 2024
@wencan
Copy link

wencan commented May 24, 2024

@WangxuP
这个方法能重现吗?

我使用pip本地安装
XINFERENCE_HOME没指定,使用默认的/.xinference
反复试了,重启之后,部署的模型依然没恢复

@WangxuP
Copy link

WangxuP commented May 24, 2024

xinference

可以的,你把容器内部目录挂载到外部就行了。

@wencan
Copy link

wencan commented May 24, 2024

@WangxuP 朋友,官方已经表示在接下来的版本实现这个功能

@WangxuP
Copy link

WangxuP commented May 24, 2024

@WangxuP 朋友,官方已经表示在接下来的版本实现这个功能

好的,看到了, 谢谢。

@XprobeBot XprobeBot modified the milestones: v0.11.2, v0.11.3 May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants