Skip to content

Commit 1b1d0ed

Browse files
authored
[gpt-oss] add triton-kernels build for gpt-oss in ROCm base Dockerfile (#637)
* add triton-kernel build for gpt-oss in base dockerfile Signed-off-by: Hongxia Yang <[email protected]> * add conditional check Signed-off-by: Hongxia Yang <[email protected]> * dealing with different setup.py locations in different triton branches Signed-off-by: Hongxia Yang <[email protected]> * fixed the dist location and reduce one copy operation Signed-off-by: Hongxia Yang <[email protected]> --------- Signed-off-by: Hongxia Yang <[email protected]>
1 parent dfe3216 commit 1b1d0ed

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docker/Dockerfile.rocm_base

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,11 @@ ARG TRITON_REPO
7474
RUN git clone ${TRITON_REPO}
7575
RUN cd triton \
7676
&& git checkout ${TRITON_BRANCH} \
77-
&& cd python \
78-
&& python3 setup.py bdist_wheel --dist-dir=dist
79-
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
8082

8183
FROM base AS build_amdsmi
8284
RUN cd /opt/rocm/share/amd_smi \

0 commit comments

Comments
 (0)