mirror of https://github.com/Mai-with-u/MaiBot.git
perf: 优化dockerfile,删除test内容
parent
5e423a092e
commit
f1414175f5
15
Dockerfile
15
Dockerfile
|
|
@ -6,25 +6,22 @@ WORKDIR /MaiMBot
|
||||||
|
|
||||||
# 复制依赖列表
|
# 复制依赖列表
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
# 同级目录下需要有 maim_message
|
# 同级目录下需要有 maim_message MaiMBot-LPMM
|
||||||
COPY maim_message /maim_message
|
#COPY maim_message /maim_message
|
||||||
COPY MaiMBot-LPMM /MaiMBot-LPMM
|
COPY MaiMBot-LPMM /MaiMBot-LPMM
|
||||||
COPY test_cpu.py /test_cpu.py
|
|
||||||
|
|
||||||
# 编译器
|
# 编译器
|
||||||
RUN apt-get update && apt-get install -y build-essential
|
RUN apt-get update && apt-get install -y build-essential
|
||||||
|
|
||||||
# test
|
# lpmm编译安装
|
||||||
RUN cat /proc/cpuinfo
|
RUN cd /MaiMBot-LPMM && uv pip install --system -r requirements.txt
|
||||||
RUN uv pip install --system py-cpuinfo
|
RUN uv pip install --system Cython py-cpuinfo setuptools
|
||||||
RUN python /test_cpu.py
|
|
||||||
RUN cd /MaiMBot-LPMM && uv pip install --system -r requirements.txt && 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 --upgrade pip
|
RUN uv pip install --system --upgrade pip
|
||||||
RUN uv pip install --system -e /maim_message
|
#RUN uv pip install --system -e /maim_message
|
||||||
RUN uv pip install --system -r requirements.txt
|
RUN uv pip install --system -r requirements.txt
|
||||||
|
|
||||||
# 复制项目代码
|
# 复制项目代码
|
||||||
|
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
import cpuinfo
|
|
||||||
|
|
||||||
cpu_info = cpuinfo.get_cpu_info()
|
|
||||||
print(f"当前cpu信息:{cpu_info}")
|
|
||||||
print(f"当前cpu指令集支持:{cpu_info['flags']}")
|
|
||||||
Loading…
Reference in New Issue