diff --git a/.github/workflows/docker-image-dev.yml b/.github/workflows/docker-image-dev.yml index 63fdafee..186a2539 100644 --- a/.github/workflows/docker-image-dev.yml +++ b/.github/workflows/docker-image-dev.yml @@ -30,9 +30,6 @@ jobs: # - name: Clone maim_message # run: git clone https://github.com/MaiM-with-u/maim_message maim_message - - name: Clone lpmm - run: git clone https://github.com/Mai-with-u/MaiMBot-LPMM.git MaiMBot-LPMM - - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 with: @@ -84,9 +81,6 @@ jobs: # - name: Clone maim_message # run: git clone https://github.com/MaiM-with-u/maim_message maim_message - - name: Clone lpmm - run: git clone https://github.com/Mai-with-u/MaiMBot-LPMM.git MaiMBot-LPMM - - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 with: diff --git a/.github/workflows/docker-image-main.yml b/.github/workflows/docker-image-main.yml index 3d9b14ab..498c89ac 100644 --- a/.github/workflows/docker-image-main.yml +++ b/.github/workflows/docker-image-main.yml @@ -34,9 +34,6 @@ jobs: # - name: Clone maim_message # run: git clone https://github.com/MaiM-with-u/maim_message maim_message - - name: Clone lpmm - run: git clone https://github.com/Mai-with-u/MaiMBot-LPMM.git MaiMBot-LPMM - - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 with: @@ -87,9 +84,6 @@ jobs: # - name: Clone maim_message # run: git clone https://github.com/MaiM-with-u/maim_message maim_message - - name: Clone lpmm - run: git clone https://github.com/Mai-with-u/MaiMBot-LPMM.git MaiMBot-LPMM - - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 with: diff --git a/Dockerfile b/Dockerfile index 6061ad44..91ad6b99 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,44 +1,27 @@ -# 编译 LPMM -FROM python:3.13-slim AS lpmm-builder -COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ - -WORKDIR /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 -RUN cd /MaiMBot-LPMM && uv pip install --system -r requirements.txt - -# 编译 LPMM -RUN cd /MaiMBot-LPMM/lib/quick_algo && python build_lib.py --cleanup --cythonize --install - -# 运行环境 +# Runtime image FROM python:3.13-slim COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ -# 工作目录 +# Working directory WORKDIR /MaiMBot ENV MAIBOT_LEGACY_0X_UPGRADE_CONFIRMED=1 -# 复制依赖列表 +# Copy dependency list COPY requirements.txt . RUN apt-get update && apt-get install -y git -# 从编译阶段复制 LPMM 编译结果 -COPY --from=lpmm-builder /usr/local/lib/python3.13/site-packages/ /usr/local/lib/python3.13/site-packages/ - -# 安装运行时依赖 +# Install runtime dependencies RUN uv pip install --system --upgrade pip RUN uv pip install --system -r requirements.txt -# 复制项目代码 +# Copy project source COPY . . +RUN git clone --depth 1 --branch plugin https://github.com/Mai-with-u/MaiBot-Napcat-Adapter.git plugin-templates/MaiBot-Napcat-Adapter +RUN chmod +x docker-entrypoint.sh + EXPOSE 8000 -ENTRYPOINT [ "python","bot.py" ] +ENTRYPOINT [ "./docker-entrypoint.sh" ] diff --git a/dashboard/package.json b/dashboard/package.json index 593113c1..c2338c25 100644 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -1,7 +1,7 @@ { "name": "maibot-dashboard", "private": true, - "version": "1.0.1", + "version": "1.0.2", "type": "module", "main": "./out/main/index.js", "scripts": { diff --git a/dashboard/src/components/layout/Sidebar.tsx b/dashboard/src/components/layout/Sidebar.tsx index 55392b13..df28de66 100644 --- a/dashboard/src/components/layout/Sidebar.tsx +++ b/dashboard/src/components/layout/Sidebar.tsx @@ -29,7 +29,7 @@ export function Sidebar({ return (