From aea806d8b50d584494264315e621fb0b3932622e Mon Sep 17 00:00:00 2001 From: infinitycat Date: Mon, 18 Aug 2025 18:59:03 +0800 Subject: [PATCH] =?UTF-8?q?perf(Dockerfile):=20=E6=9B=B4=E6=96=B0deb?= =?UTF-8?q?=EF=BC=8Cpy=E7=89=88=E6=9C=AC=EF=BC=8C=E4=BC=98=E5=8C=96Dockerf?= =?UTF-8?q?ile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index af4a6e1c..10b2681d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,29 +1,30 @@ -FROM python:3.13.5-slim-bookworm +FROM python:3.13.7-slim-trixie COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ -EXPOSE 8000 - -# 编译器 -RUN apt-get update && apt-get install -y build-essential && rm -rf /var/lib/apt/lists/* -RUN uv pip install --system --upgrade pip Cython py-cpuinfo setuptools # 工作目录 WORKDIR /MaiMBot # 复制依赖列表 COPY requirements.txt . -# 同级目录下需要有 maim_message MaiMBot-LPMM -#COPY maim_message /maim_message +# 同级目录下需要有 MaiMBot-LPMM COPY MaiMBot-LPMM /MaiMBot-LPMM +# 编译器 +RUN apt-get update && apt-get install -y build-essential +RUN uv pip install --system --upgrade pip + # lpmm编译安装 RUN cd /MaiMBot-LPMM && uv pip install --system -r requirements.txt +RUN uv pip install --system Cython py-cpuinfo setuptools RUN cd /MaiMBot-LPMM/lib/quick_algo && python build_lib.py --cleanup --cythonize --install + # 安装依赖 -#RUN uv pip install --system -e /maim_message RUN uv pip install --system -r requirements.txt # 复制项目代码 COPY . . +EXPOSE 8000 + ENTRYPOINT [ "python","bot.py" ]