File tree 4 files changed +29
-6
lines changed
inference-main/xinference/deploy/docker
4 files changed +29
-6
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list && \
15
15
apt install -y build-essential curl procps git libgl1 ffmpeg python3 python3-pip python-is-python3 && \
16
16
mkdir -p $NVM_DIR && \
17
17
# 安装 Node.js 环境
18
- bash /opt/inference/xinference/deploy/docker/nvm_v0 .39.7_install .sh && \
18
+ bash /opt/inference/xinference/deploy/docker/nvm-v0 .39.7-install .sh && \
19
19
. $NVM_DIR/nvm.sh && \
20
20
nvm install $NODE_VERSION && \
21
21
nvm alias default $NODE_VERSION && \
@@ -34,11 +34,11 @@ ENV PIP_INDEX_URL=https://mirrors.aliyun.com/pypi/simple \
34
34
# 安装 Python 依赖
35
35
RUN python3 -m pip install --upgrade pip && \
36
36
# 安装 PyTorch 的 CPU 版本(适配 ARM64)
37
- pip install torch torchvision torchaudio sentence-transformers && \
38
- # 安装 requirements_cpu.txt 中列出的依赖(仅当需要时)
39
- # pip install -i "$PIP_INDEX" --upgrade-strategy only-if-needed -r /opt/inference/xinference/deploy/docker/requirements_cpu.txt && \
40
- # 安装 llama-cpp-python
41
- # CMAKE_ARGS="-DLLAMA_METAL=on" pip install llama-cpp-python && \
37
+ pip install torch torchvision torchaudio sentence-transformers && \
38
+ # # 安装 llama-cpp-python
39
+ # CMAKE_ARGS="-DLLAMA_METAL=on" pip install llama-cpp-python && \
40
+ # # 安装 requirements_cpu.txt 中列出的依赖(仅当需要时)
41
+ # pip install -i "$PIP_INDEX" --upgrade-strategy only-if-needed -r /opt/inference/xinference/deploy/docker/requirements_cpu.txt && \
42
42
43
43
# 构建项目
44
44
cd /opt/inference && \
Original file line number Diff line number Diff line change
1
+ version : ' 4.38.0'
2
+ services :
3
+ xinference :
4
+ container_name : Xinference:0221
5
+ image : xinference:1.0-cpu-arm64
6
+
7
+ # Docker Compose 开机启动容器
8
+ restart : always
9
+ environment :
10
+ - XINFERENCE_MODEL_SRC=modelscope
11
+ ports :
12
+ - " 9998:9997"
13
+
14
+ # 容器开机启动 xinference服务、bge-reranker-v2-m3模型
15
+ command :
16
+ sh -c
17
+ " xinference-local -H 0.0.0.0 --log-level debug &
18
+ until curl -sf http://localhost:9997/status; do sleep 1; done &&
19
+ xinference launch --model-name bge-reranker-v2-m3 --model-type rerank &&
20
+ tail -f /dev/null
21
+ "
22
+ # apt-get -y install netcat &&
23
+ # while ! nc -z localhost 9997; do sleep 10; done &&
File renamed without changes.
You can’t perform that action at this time.
0 commit comments