mirror of https://github.com/Mai-with-u/MaiBot.git
perf(Dockerfile): 更新deb,py版本,优化Dockerfile
parent
9c8a34ce24
commit
aea806d8b5
19
Dockerfile
19
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/
|
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
|
WORKDIR /MaiMBot
|
||||||
|
|
||||||
# 复制依赖列表
|
# 复制依赖列表
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
# 同级目录下需要有 maim_message MaiMBot-LPMM
|
# 同级目录下需要有 MaiMBot-LPMM
|
||||||
#COPY maim_message /maim_message
|
|
||||||
COPY MaiMBot-LPMM /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编译安装
|
# lpmm编译安装
|
||||||
RUN cd /MaiMBot-LPMM && uv pip install --system -r requirements.txt
|
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 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
|
RUN uv pip install --system -r requirements.txt
|
||||||
|
|
||||||
# 复制项目代码
|
# 复制项目代码
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
EXPOSE 8000
|
||||||
|
|
||||||
ENTRYPOINT [ "python","bot.py" ]
|
ENTRYPOINT [ "python","bot.py" ]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue