From 340716fd321ae242c48c93790e8e36e3a5f38172 Mon Sep 17 00:00:00 2001 From: whosmyqueen Date: Tue, 13 May 2025 17:56:06 +0800 Subject: [PATCH] =?UTF-8?q?build(Dockerfile-server):=20=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E6=B8=85=E5=8D=8E=E5=A4=A7=E5=AD=A6=E9=95=9C=E5=83=8F=E6=BA=90?= =?UTF-8?q?=E5=8A=A0=E9=80=9F=E5=9B=BD=E5=86=85=E6=9E=84=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 Python 依赖安装中使用清华大学 PyPI 镜像源 - 在系统依赖安装前切换到清华大学 APT 镜像源 --- Dockerfile-server | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile-server b/Dockerfile-server index 7eb771145..b9db1cf61 100644 --- a/Dockerfile-server +++ b/Dockerfile-server @@ -6,13 +6,16 @@ WORKDIR /app COPY main/xiaozhi-server/requirements.txt . # 安装Python依赖 -RUN pip install --no-cache-dir -r requirements.txt +RUN pip install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple # 第二阶段:生产镜像 FROM python:3.10-slim WORKDIR /opt/xiaozhi-esp32-server +# if you located in China, you can use tsinghua mirror to speed up +RUN sed -i 's@deb.debian.org@mirrors.tuna.tsinghua.edu.cn@g' /etc/apt/sources.list.d/debian.sources + # 安装系统依赖 RUN apt-get update && \ apt-get install -y --no-install-recommends libopus0 ffmpeg && \