shanyh 发表于 2026-5-26 00:02:52

【已解答】通过Docker模块“构建镜像”功能构建镜像总是...

为了能快速了解并处理您的问题,请提供以下基础信息:面板、插件版本:2026-04-21 11:42:07 - Linux面板11.7.0
Docker版本                         29.5.1docker-compose版本   5.1.3unix地址                               unix:///var/run/docker.sock数据目录                               /work/docker 系统版本:Ubuntu 22.04.5 LTS
架构                                       x86_64内核版本                              5.15.0-179-genericCPU核心                              12内存大小                              47.14 GB问题描述:通过“构建镜像”功能构建镜像总是报错无法成功构建。
但使用以下命令则可正常构建:
cd /data/scripts/myhloli_mineru

docker build \
-f docker/china/gcu.Dockerfile \
-t mineru:myhloli-2.7.1 \
.


请排查是否为“构建镜像”功能BUG,Dockerfile内容如下:

# Base image containing the vLLM inference environment, requiring amd64(x86-64) CPU + Enflame GCU.
FROM crpi-vofi3w62lkohhxsp.cn-shanghai.personal.cr.aliyuncs.com/opendatalab-mineru/gcu:docker_images_topsrider_i3x_3.6.20260106_vllm0.11_pytorch2.8.0


# Install Noto fonts for Chinese characters
RUN echo 'deb http://mirrors.aliyun.com/ubuntu/ noble main restricted universe multiverse\n\
deb http://mirrors.aliyun.com/ubuntu/ noble-updates main restricted universe multiverse\n\
deb http://mirrors.aliyun.com/ubuntu/ noble-backports main restricted universe multiverse\n\
deb http://mirrors.aliyun.com/ubuntu/ noble-security main restricted universe multiverse' > /tmp/aliyun-sources.list && \
    apt-get -o Dir::Etc::SourceList=/tmp/aliyun-sources.list update && \
    apt-get -o Dir::Etc::SourceList=/tmp/aliyun-sources.list install -y \
      fonts-noto-core \
      fonts-noto-cjk \
      fontconfig && \
    fc-cache -fv && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/* /tmp/aliyun-sources.list

# Install mineru latest
RUN python3 -m pip install "mineru>=3.0.0" \
                            numpy==1.26.4 \
                            opencv-python==4.11.0.86 \
                            -i https://mirrors.aliyun.com/pypi/simple && \
    python3 -m pip cache purge

# Download models and update the configuration file
RUN /bin/bash -c "mineru-models-download -s modelscope -m all"

# Set the entry point to activate the virtual environment and run the command line tool
ENTRYPOINT ["/bin/bash", "-c", "export MINERU_MODEL_SOURCE=local && exec \"$@\"", "--"]


相关截图(日志、错误):暂无

shanyh 发表于 2026-5-26 01:23:08

找到原因了,报错是因为构建镜像太大(47G)导致的报错,实际还在运行,但报错后会构建多个无效镜像,还需要手动删除,最终还得是命令操作,进度直观、不报错。官方可就此问题修复下,也算是大容量镜像下的bug吧!~

大炮运维V587 发表于 2026-5-26 15:12:45

shanyh 发表于 2026-5-26 01:23
找到原因了,报错是因为构建镜像太大(47G)导致的报错,实际还在运行,但报错后会构建多个无效镜像,还需 ...

# Base image (amd64 + Enflame GCU / vLLM 0.11 / PyTorch 2.8.0)
FROM crpi-vofi3w62lkohhxsp.cn-shanghai.personal.cr.aliyuncs.com/opendatalab-mineru/gcu:docker_images_topsrider_i3x_3.6.20260106_vllm0.11_pytorch2.8.0

# 切换阿里源(稳定不报错)
RUN rm -f /etc/apt/sources.list.d/* && \
    echo 'deb http://mirrors.aliyun.com/ubuntu/ noble main restricted universe multiverse' > /etc/apt/sources.list && \
    echo 'deb http://mirrors.aliyun.com/ubuntu/ noble-updates main restricted universe multiverse' >> /etc/apt/sources.list && \
    echo 'deb http://mirrors.aliyun.com/ubuntu/ noble-security main restricted universe multiverse' >> /etc/apt/sources.list && \
    apt update && apt install -y --no-install-recommends \
      fonts-noto-core \
      fonts-noto-cjk \
      fontconfig \
      libgl1-mesa-glx \
      libglib2.0-0 && \
    fc-cache -fv && \
    apt clean && \
    rm -rf /var/lib/apt/lists/*

# 安装 Python 依赖(固定版本避免冲突)
RUN python3 -m pip install --upgrade pip -i https://mirrors.aliyun.com/pypi/simple && \
    python3 -m pip install \
      "mineru>=3.0.0" \
      numpy==1.26.4 \
      opencv-python==4.11.0.86 \
      -i https://mirrors.aliyun.com/pypi/simple && \
    python3 -m pip cache purge

# 下载模型(modelscope 加速)
ENV MINERU_MODEL_SOURCE=local
RUN mineru-models-download -s modelscope -m all

# 工作目录
WORKDIR /app

# 入口(兼容 docker run / 自定义命令)
ENTRYPOINT ["/bin/bash", "-c"]
CMD ["exec \"$@\"", "--"]


您好,根据您当前的Dockerfile做出了简单的优化
页: [1]
查看完整版本: 【已解答】通过Docker模块“构建镜像”功能构建镜像总是...