x
This commit is contained in:
+12
-6
@@ -15,9 +15,10 @@ ARG PYTHON_VER=3.12
|
||||
ARG VENV=/opt/mineru_venv
|
||||
ARG TORCH_INDEX=https://download.pytorch.org/whl/rocm7.2
|
||||
|
||||
# -- GitHub 访问(国内无镜像,需代理)----------------------------------------
|
||||
ARG GIT_PROXY=http://127.0.0.1:8118
|
||||
|
||||
# -- 国内镜像配置 -----------------------------------------------------------
|
||||
# GitHub 加速(ghproxy.com)
|
||||
ARG GH_PROXY=https://ghproxy.com/
|
||||
# PyPI 镜像
|
||||
ARG PIP_INDEX=https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
|
||||
@@ -93,10 +94,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
# 阶段 4:CMake 4.0(vllm 要求 ≥ 4.0,Ubuntu 24.04 自带 3.28 不够)
|
||||
# ===========================================================================
|
||||
RUN cd /tmp && \
|
||||
# 优先直连 GitHub(network: host 可用),失败则尝试 ghproxy 备用
|
||||
(wget -q https://github.com/Kitware/CMake/releases/download/v4.0.0/cmake-4.0.0-linux-x86_64.tar.gz || \
|
||||
wget -q ${GH_PROXY}https://github.com/Kitware/CMake/releases/download/v4.0.0/cmake-4.0.0-linux-x86_64.tar.gz || \
|
||||
wget -q https://gh-proxy.com/https://github.com/Kitware/CMake/releases/download/v4.0.0/cmake-4.0.0-linux-x86_64.tar.gz) && \
|
||||
# wget 通过代理下载 CMake(国内 GitHub 不通)
|
||||
export http_proxy=${GIT_PROXY} https_proxy=${GIT_PROXY} && \
|
||||
wget -q https://github.com/Kitware/CMake/releases/download/v4.0.0/cmake-4.0.0-linux-x86_64.tar.gz && \
|
||||
tar -xzf cmake-4.0.0-linux-x86_64.tar.gz && \
|
||||
cp -r cmake-4.0.0-linux-x86_64/bin/* /usr/local/bin/ && \
|
||||
cp -r cmake-4.0.0-linux-x86_64/share/* /usr/local/share/ && \
|
||||
@@ -134,6 +134,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
# 阶段 7:amd-aiter + flash_attn
|
||||
# ===========================================================================
|
||||
RUN set -ex && \
|
||||
# git 通过代理访问 GitHub(国内不通,其他源已用国内镜像)
|
||||
git config --global http.proxy ${GIT_PROXY} && \
|
||||
git config --global https.proxy ${GIT_PROXY} && \
|
||||
# aiter(AMD 优化的 attention 算子)
|
||||
cd /opt && git clone --recursive --depth 1 https://github.com/ROCm/aiter.git && \
|
||||
${VENV}/bin/pip install --no-cache-dir -e /opt/aiter && \
|
||||
@@ -148,6 +151,9 @@ RUN set -ex && \
|
||||
# 阶段 8:编译 vllm
|
||||
# ===========================================================================
|
||||
RUN set -ex && \
|
||||
# git 通过代理访问 GitHub
|
||||
git config --global http.proxy ${GIT_PROXY} && \
|
||||
git config --global https.proxy ${GIT_PROXY} && \
|
||||
# setuptools 升级(PEP 639 兼容)
|
||||
${VENV}/bin/pip install --no-cache-dir -U \
|
||||
"setuptools>=77.0.3" setuptools_scm setuptools_rust wheel && \
|
||||
|
||||
@@ -18,10 +18,8 @@ services:
|
||||
# gfx1101 = RX 7800 XT / 7700 XT
|
||||
# gfx1030 = RX 6950 / 6900 / 6800 系列
|
||||
ARCH: gfx1201
|
||||
# ---- GitHub 加速代理(国内构建用,若 ghproxy 不可用请更换)----
|
||||
# GH_PROXY: https://ghproxy.com/
|
||||
# ---- PyPI 镜像(国内构建用)----
|
||||
# PIP_INDEX: https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
# ---- Git 代理(仅 GitHub 需要,国内无镜像)----
|
||||
GIT_PROXY: http://127.0.0.1:8118
|
||||
container_name: mineru-rocm
|
||||
stdin_open: true
|
||||
tty: true
|
||||
|
||||
Reference in New Issue
Block a user