Skip to content

Commit 7a651f5

Browse files
committed
0221更新
1 parent 3f83d20 commit 7a651f5

File tree

4 files changed

+29
-6
lines changed

4 files changed

+29
-6
lines changed

.DS_Store

0 Bytes
Binary file not shown.

inference-main/xinference/deploy/docker/cpu_arm64.Dockerfile

+6-6
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list && \
1515
apt install -y build-essential curl procps git libgl1 ffmpeg python3 python3-pip python-is-python3 && \
1616
mkdir -p $NVM_DIR && \
1717
# 安装 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 && \
1919
. $NVM_DIR/nvm.sh && \
2020
nvm install $NODE_VERSION && \
2121
nvm alias default $NODE_VERSION && \
@@ -34,11 +34,11 @@ ENV PIP_INDEX_URL=https://mirrors.aliyun.com/pypi/simple \
3434
# 安装 Python 依赖
3535
RUN python3 -m pip install --upgrade pip && \
3636
# 安装 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 && \
4242

4343
#构建项目
4444
cd /opt/inference && \
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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 &&

0 commit comments

Comments
 (0)