services:
xinference:
image: xprobe/xinference:latest
container_name: xinference
command: xinference-local -H 0.0.0.0
environment:
- XINFERENCE_MODEL_SRC=modelscope # 指定国内镜像源
# - HF_ENDPOINT=https://hf-mirror.com # 如需切换 HuggingFace 镜像
ports:
- "9997:9997"
volumes:
- ./xinference:/root/.xinference # 主配置目录
- ./huggingface:/root/.cache/huggingface # HF缓存
- ./modelscope:/root/.cache/modelscope # ModelScope缓存
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
本博客所有文章除特别声明外,均采用
CC BY-NC-SA 4.0
许可协议。转载请注明来自Hello World !
评论
评论