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

[BUG] Docker-Compose部署重启后xinference界面启动模型报错 #5140

Open
Alexkerl opened this issue Dec 18, 2024 · 2 comments
Open
Labels
bug Something isn't working

Comments

@Alexkerl
Copy link

Alexkerl commented Dec 18, 2024

问题描述 / Problem Description
按照docs/install/README_docker.md部署后正常使用,重启后使用xinference界面,再次加载缓存模型,出现如下错误:OSError: [address=0.0.0.0:39697, pid=93] /root/.xinference/cache/qwen2-instruct-pytorch-1_5b does not appear to have a file named config.json. Checkout 'https://huggingface.co//root/.xinference/cache/qwen2-instruct-pytorch-1_5b/tree/None' for available files.

docker-compose.yaml配置如下:

version: '3.9'
services:
  xinference:
    image: xprobe/xinference:v0.12.3
    restart: always
    command: xinference-local -H 0.0.0.0
    ports: # 不使用 host network 时可打开.
      - "9997:9997"
    # network_mode: "host"
    # 将本地路径(~/xinference)挂载到容器路径(/root/.xinference)中,
    # 详情见: https://inference.readthedocs.io/zh-cn/latest/getting_started/using_docker_image.html
    volumes:
      - /home/user/xinference/cache:/root/.xinference
      - /home/user/xinference/cache:/root/.cache/huggingface
      - /home/user/xinference/cache:/root/.cache/modelscope
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]
    runtime: nvidia
    # 模型源更改为 ModelScope, 默认为 HuggingFace
    environment:
      - XINFERENCE_MODEL_SRC=modelscope
  chatchat:
    image: chatimage/chatchat:0.3.1.3-93e2c87-20240829
    # image: ccr.ccs.tencentyun.com/chatchat/chatchat:0.3.1.2-2024-0720
    restart: always
    ports: # 不使用 host network 时可打开.
     - "7861:7861"
     - "8501:8501"
    # network_mode: "host"
    # 将本地路径(~/chatchat)挂载到容器默认数据路径($CHATCHAT_ROOT)中
    volumes:
      - /home/user/chatchat/data:/root/chatchat_data/data
@Alexkerl Alexkerl added the bug Something isn't working label Dec 18, 2024
Copy link

dosubot bot commented Dec 18, 2024

@Alexkerl 你好!我是Dosu,我是一个可以帮助你解决错误、回答问题并成为贡献者的机器人。我很高兴能帮助你。

To resolve the OSError related to the missing config.json file when restarting the Docker-Compose deployment for Xinference, ensure that the local directory where config.json is supposed to be located is correctly mounted in the docker-compose.yaml file. According to your configuration, the local directory /home/user/xinference/cache is mounted to /root/.xinference in the container. Make sure that the config.json file exists in the /home/user/xinference/cache directory on your host machine.

Additionally, verify that the cache directories are correctly mounted by ensuring the following lines in your docker-compose.yaml are correct:

volumes:
  - /home/user/xinference/cache:/root/.xinference
  - /home/user/xinference/cache:/root/.cache/huggingface
  - /home/user/xinference/cache:/root/.cache/modelscope

Ensure that the directory /home/user/xinference/cache contains the necessary model files, including config.json. If the model source is set to ModelScope, verify that the model files are compatible and available in the expected structure.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@Alexkerl
Copy link
Author

I'm sure directory /home/user/xinference/cache contains the necessary model files. Because it was normal during the first run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant