本地启动xinference失败,docker镜像下载失败处理方案

 

services:

  xinference:

    image: python:3.11-slim

    container_name: xinference-server

    ports:

      - "9997:9997"

    volumes:

      # 挂载本地模型缓存目录

      - C:\Users\Administrator\.xinference:/root/.xinference

      # 挂载HuggingFace缓存目录(如果存在)

      - C:\Users\Administrator\.cache\huggingface:/root/.cache/huggingface

    environment:

      - XINFERENCE_HOME=/root/.xinference

      - CUDA_VISIBLE_DEVICES=0

      - PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple

    command: >

      bash -c "

      pip install xinference[transformers] torch --no-cache-dir &&

      xinference-local --host 0.0.0.0 --port 9997

      "

    deploy:

      resources:

        reservations:

          devices:

            - driver: nvidia

              count: 1

              capabilities: [gpu]

    restart: unless-stopped

    networks:

      - xinference-network

networks:

  xinference-network:

    driver: bridge

  • 后台启动: docker exec -d ragflow-server bash -lc "nohup python -m xinference.deploy.local --host 0.0.0.0 --port 9997 > /tmp/xinference.log 2>&1 &"

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值