A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 14, 05:30 UTC
[ROCm][CI/Build] Sync ROCm dockerfiles with the ROCm fork (#24279)
Signed-off-by: Gregory Shtrasberg <Gregory.Shtrasberg@amd.com>
Gregory Shtrasberg committed
Sep 9, 2025 at 12:21 UTC
b9a1c4c8a2430555f1959938b87b10640c751e57
2 files changed
+33
-33
docker/Dockerfile.rocm
+3
-1
@@ -47,6 +47,7 @@ COPY --from=build_vllm ${COMMON_WORKDIR}/vllm/requirements /requirements
47
COPY --from=build_vllm ${COMMON_WORKDIR}/vllm/benchmarks /benchmarks
48
COPY --from=build_vllm ${COMMON_WORKDIR}/vllm/tests /tests
49
COPY --from=build_vllm ${COMMON_WORKDIR}/vllm/examples /examples
50
+COPY --from=build_vllm ${COMMON_WORKDIR}/vllm/docker/Dockerfile.rocm /docker/
51
COPY --from=build_vllm ${COMMON_WORKDIR}/vllm/.buildkite /.buildkite
52
53
# -----------------------
@@ -71,7 +72,7 @@ COPY --from=build_vllm ${COMMON_WORKDIR}/vllm /vllm-workspace
72
RUN cd /vllm-workspace \
73
&& rm -rf vllm \
74
&& python3 -m pip install -e tests/vllm_test_utils \
74
- && python3 -m pip install git+https://github.com/EleutherAI/lm-evaluation-harness.git@206b7722158f58c35b7ffcd53b035fdbdda5126d#egg=lm-eval[api] \
75
+ && python3 -m pip install lm-eval[api]==0.4.4 \
76
&& python3 -m pip install pytest-shard
77
78
# -----------------------
@@ -100,6 +101,7 @@ ARG COMMON_WORKDIR
101
# Copy over the benchmark scripts as well
102
COPY --from=export_vllm /benchmarks ${COMMON_WORKDIR}/vllm/benchmarks
103
COPY --from=export_vllm /examples ${COMMON_WORKDIR}/vllm/examples
104
+COPY --from=export_vllm /docker ${COMMON_WORKDIR}/vllm/docker
105
106
ENV RAY_EXPERIMENTAL_NOSET_ROCR_VISIBLE_DEVICES=1
107
ENV TOKENIZERS_PARALLELISM=false
docker/Dockerfile.rocm_base
+30
-32
@@ -1,18 +1,16 @@
1
-ARG BASE_IMAGE=rocm/dev-ubuntu-22.04:6.3.1-complete
2
-ARG HIPBLASLT_BRANCH="db8e93b4"
3
-ARG HIPBLAS_COMMON_BRANCH="7c1566b"
1
+ARG BASE_IMAGE=rocm/dev-ubuntu-22.04:6.4.1-complete
2
+ARG HIPBLASLT_BRANCH="aa0bda7b"
3
+ARG HIPBLAS_COMMON_BRANCH="9b80ba8e"
4
ARG LEGACY_HIPBLASLT_OPTION=
5
-ARG RCCL_BRANCH="648a58d"
6
-ARG RCCL_REPO="https://github.com/ROCm/rccl"
5
ARG TRITON_BRANCH="e5be006"
6
ARG TRITON_REPO="https://github.com/triton-lang/triton.git"
9
-ARG PYTORCH_BRANCH="295f2ed4"
7
+ARG PYTORCH_BRANCH="f717b2af"
8
ARG PYTORCH_VISION_BRANCH="v0.21.0"
11
-ARG PYTORCH_REPO="https://github.com/pytorch/pytorch.git"
9
+ARG PYTORCH_REPO="https://github.com/ROCm/pytorch.git"
10
ARG PYTORCH_VISION_REPO="https://github.com/pytorch/vision.git"
11
ARG FA_BRANCH="1a7f4dfa"
12
ARG FA_REPO="https://github.com/Dao-AILab/flash-attention.git"
15
-ARG AITER_BRANCH="916bf3c"
13
+ARG AITER_BRANCH="4822e675"
14
ARG AITER_REPO="https://github.com/ROCm/aiter.git"
15
16
FROM ${BASE_IMAGE} AS base
@@ -45,7 +43,7 @@ RUN apt-get update -y \
43
&& curl -sS https://bootstrap.pypa.io/get-pip.py | python${PYTHON_VERSION} \
44
&& python3 --version && python3 -m pip --version
45
48
-RUN pip install -U packaging 'cmake<4' ninja wheel setuptools pybind11 Cython
46
+RUN pip install -U packaging 'cmake<4' ninja wheel 'setuptools<80' pybind11 Cython
47
48
FROM base AS build_hipblaslt
49
ARG HIPBLASLT_BRANCH
@@ -53,6 +51,7 @@ ARG HIPBLAS_COMMON_BRANCH
51
# Set to "--legacy_hipblas_direct" for ROCm<=6.2
52
ARG LEGACY_HIPBLASLT_OPTION
53
RUN git clone https://github.com/ROCm/hipBLAS-common.git
54
+RUN apt-get remove -y hipblaslt && apt-get autoremove -y && apt-get autoclean -y
55
RUN cd hipBLAS-common \
56
&& git checkout ${HIPBLAS_COMMON_BRANCH} \
57
&& mkdir build \
@@ -69,24 +68,17 @@ RUN cd hipBLASLt \
68
&& make package
69
RUN mkdir -p /app/install && cp /app/hipBLASLt/build/release/*.deb /app/hipBLAS-common/build/*.deb /app/install
70
72
-FROM base AS build_rccl
73
-ARG RCCL_BRANCH
74
-ARG RCCL_REPO
75
-RUN git clone ${RCCL_REPO}
76
-RUN cd rccl \
77
- && git checkout ${RCCL_BRANCH} \
78
- && ./install.sh -p --amdgpu_targets ${PYTORCH_ROCM_ARCH}
79
-RUN mkdir -p /app/install && cp /app/rccl/build/release/*.deb /app/install
80
-
71
FROM base AS build_triton
72
ARG TRITON_BRANCH
73
ARG TRITON_REPO
74
RUN git clone ${TRITON_REPO}
75
RUN cd triton \
76
&& git checkout ${TRITON_BRANCH} \
87
- && cd python \
88
- && python3 setup.py bdist_wheel --dist-dir=dist
89
-RUN mkdir -p /app/install && cp /app/triton/python/dist/*.whl /app/install
77
+ && if [ ! -f setup.py ]; then cd python; fi \
78
+ && python3 setup.py bdist_wheel --dist-dir=dist \
79
+ && mkdir -p /app/install && cp dist/*.whl /app/install
80
+RUN if [ -d triton/python/triton_kernels ]; then pip install build && cd triton/python/triton_kernels \
81
+ && python3 -m build --wheel && cp dist/*.whl /app/install; fi
82
83
FROM base AS build_amdsmi
84
RUN cd /opt/rocm/share/amd_smi \
@@ -132,15 +124,25 @@ RUN cd aiter \
124
RUN pip install pyyaml && cd aiter && PREBUILD_KERNELS=1 GPU_ARCHS=gfx942 python3 setup.py bdist_wheel --dist-dir=dist && ls /app/aiter/dist/*.whl
125
RUN mkdir -p /app/install && cp /app/aiter/dist/*.whl /app/install
126
127
+FROM base AS debs
128
+RUN mkdir /app/debs
129
+RUN --mount=type=bind,from=build_hipblaslt,src=/app/install/,target=/install \
130
+ cp /install/*.deb /app/debs
131
+RUN --mount=type=bind,from=build_triton,src=/app/install/,target=/install \
132
+ cp /install/*.whl /app/debs
133
+RUN --mount=type=bind,from=build_amdsmi,src=/app/install/,target=/install \
134
+ cp /install/*.whl /app/debs
135
+RUN --mount=type=bind,from=build_pytorch,src=/app/install/,target=/install \
136
+ cp /install/*.whl /app/debs
137
+RUN --mount=type=bind,from=build_aiter,src=/app/install/,target=/install \
138
+ cp /install/*.whl /app/debs
139
+
140
FROM base AS final
141
RUN --mount=type=bind,from=build_hipblaslt,src=/app/install/,target=/install \
142
dpkg -i /install/*deb \
138
- && sed -i 's/, hipblaslt-dev \(.*\), hipcub-dev/, hipcub-dev/g' /var/lib/dpkg/status \
139
- && sed -i 's/, hipblaslt \(.*\), hipfft/, hipfft/g' /var/lib/dpkg/status
140
-RUN --mount=type=bind,from=build_rccl,src=/app/install/,target=/install \
141
- dpkg -i /install/*deb \
142
- && sed -i 's/, rccl-dev \(.*\), rocalution/, rocalution/g' /var/lib/dpkg/status \
143
- && sed -i 's/, rccl \(.*\), rocalution/, rocalution/g' /var/lib/dpkg/status
143
+ && perl -p -i -e 's/, hipblas-common-dev \([^)]*?\), /, /g' /var/lib/dpkg/status \
144
+ && perl -p -i -e 's/, hipblaslt-dev \([^)]*?\), /, /g' /var/lib/dpkg/status \
145
+ && perl -p -i -e 's/, hipblaslt \([^)]*?\), /, /g' /var/lib/dpkg/status
146
RUN --mount=type=bind,from=build_triton,src=/app/install/,target=/install \
147
pip install /install/*.whl
148
RUN --mount=type=bind,from=build_amdsmi,src=/app/install/,target=/install \
@@ -154,8 +156,6 @@ ARG BASE_IMAGE
156
ARG HIPBLAS_COMMON_BRANCH
157
ARG HIPBLASLT_BRANCH
158
ARG LEGACY_HIPBLASLT_OPTION
157
-ARG RCCL_BRANCH
158
-ARG RCCL_REPO
159
ARG TRITON_BRANCH
160
ARG TRITON_REPO
161
ARG PYTORCH_BRANCH
@@ -170,8 +170,6 @@ RUN echo "BASE_IMAGE: ${BASE_IMAGE}" > /app/versions.txt \
170
&& echo "HIPBLAS_COMMON_BRANCH: ${HIPBLAS_COMMON_BRANCH}" >> /app/versions.txt \
171
&& echo "HIPBLASLT_BRANCH: ${HIPBLASLT_BRANCH}" >> /app/versions.txt \
172
&& echo "LEGACY_HIPBLASLT_OPTION: ${LEGACY_HIPBLASLT_OPTION}" >> /app/versions.txt \
173
- && echo "RCCL_BRANCH: ${RCCL_BRANCH}" >> /app/versions.txt \
174
- && echo "RCCL_REPO: ${RCCL_REPO}" >> /app/versions.txt \
173
&& echo "TRITON_BRANCH: ${TRITON_BRANCH}" >> /app/versions.txt \
174
&& echo "TRITON_REPO: ${TRITON_REPO}" >> /app/versions.txt \
175
&& echo "PYTORCH_BRANCH: ${PYTORCH_BRANCH}" >> /app/versions.txt \
@@ -180,4 +178,4 @@ RUN echo "BASE_IMAGE: ${BASE_IMAGE}" > /app/versions.txt \
178
&& echo "PYTORCH_VISION_REPO: ${PYTORCH_VISION_REPO}" >> /app/versions.txt \
179
&& echo "FA_BRANCH: ${FA_BRANCH}" >> /app/versions.txt \
180
&& echo "AITER_BRANCH: ${AITER_BRANCH}" >> /app/versions.txt \
183
- && echo "AITER_REPO: ${AITER_REPO}" >> /app/versions.txt
181
+ && echo "AITER_REPO: ${AITER_REPO}" >> /app/versions.txt
\ No newline at end of file