Skip to content

Commit 98511b0

Browse files
authored
Set build user's uid when creating Migraphx/ROCM docker images (#23657)
### Description Set build user's uid when creating Migraphx/ROCM docker images
1 parent 23f787e commit 98511b0

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

cmake/onnxruntime_unittests.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -883,6 +883,12 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten" OR IOS)
883883
"${TEST_SRC_DIR}/providers/cpu/model_tests.cc"
884884
)
885885
endif()
886+
if (USE_ROCM)
887+
# The following unit test takes about 40 minutes.
888+
list(REMOVE_ITEM all_tests
889+
"${TEST_SRC_DIR}/contrib_ops/matmul_4bits_test.cc"
890+
)
891+
endif()
886892

887893
set(test_all_args)
888894
if (onnxruntime_USE_TENSORRT)

tools/ci_build/github/azure-pipelines/linux-rocm-ci-pipeline.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ jobs:
6161
parameters:
6262
Dockerfile: tools/ci_build/github/linux/docker/rocm-ci-pipeline-env.Dockerfile
6363
Context: tools/ci_build/github/linux/docker
64-
DockerBuildArgs: "--build-arg ROCM_VERSION=$(RocmVersion)"
65-
Repository: onnxruntimerocm-cibuild-rocm$(RocmVersion)
64+
DockerBuildArgs: "--build-arg ROCM_VERSION=$(RocmVersion) --build-arg BUILD_UID=1004"
65+
Repository: onnxruntimerocm-cibuild-rocm$(RocmVersion)new
6666

6767
- task: Cache@2
6868
inputs:
@@ -90,7 +90,7 @@ jobs:
9090
--volume $(CCACHE_DIR):/cache \
9191
-e CCACHE_DIR=/cache \
9292
--workdir /onnxruntime_src \
93-
onnxruntimerocm-cibuild-rocm$(RocmVersion) \
93+
onnxruntimerocm-cibuild-rocm$(RocmVersion)new \
9494
/bin/bash -c "
9595
set -ex; \
9696
env; \
@@ -161,8 +161,8 @@ jobs:
161161
parameters:
162162
Dockerfile: tools/ci_build/github/linux/docker/rocm-ci-pipeline-env.Dockerfile
163163
Context: tools/ci_build/github/linux/docker
164-
DockerBuildArgs: "--build-arg ROCM_VERSION=$(RocmVersion)"
165-
Repository: onnxruntimerocm-cibuild-rocm$(RocmVersion)
164+
DockerBuildArgs: "--build-arg ROCM_VERSION=$(RocmVersion) --build-arg BUILD_UID=1004"
165+
Repository: onnxruntimerocm-cibuild-rocm$(RocmVersion)new
166166

167167
- task: CmdLine@2
168168
inputs:
@@ -179,7 +179,7 @@ jobs:
179179
--volume $(Build.BinariesDirectory):/build \
180180
--volume /data/models:/build/models:ro \
181181
--workdir /build/Release \
182-
onnxruntimerocm-cibuild-rocm$(RocmVersion) \
182+
onnxruntimerocm-cibuild-rocm$(RocmVersion)new \
183183
/bin/bash -c "
184184
set -ex; \
185185
xargs -a /build/Release/perms.txt chmod a+x; \
@@ -225,10 +225,10 @@ jobs:
225225
-e KERNEL_EXPLORER_BATCHED_GEMM_MAX_BATCH_SIZE=8 \
226226
-e KERNEL_EXPLORER_TEST_USE_CUPY=0 \
227227
-e CUPY_CACHE_DIR=/build/Release \
228-
onnxruntimerocm-cibuild-rocm$(RocmVersion) \
228+
onnxruntimerocm-cibuild-rocm$(RocmVersion)new \
229229
/bin/bash -c "
230230
set -ex; \
231-
python --version; \
231+
python --version; id ; ls -lha /home ; \
232232
ls /opt/miniconda/envs/rocm-ci/lib/; \
233233
pytest /onnxruntime_src/onnxruntime/python/tools/kernel_explorer/ -n 4 --reruns 1 --durations=100"
234234
workingDirectory: $(Build.SourcesDirectory)

tools/ci_build/github/linux/docker/rocm-ci-pipeline-env.Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ RUN apt-get update && \
1717
printf "deb [arch=amd64] https://repo.radeon.com/rocm/apt/$ROCM_VERSION/ jammy main" | tee /etc/apt/sources.list.d/rocm.list && \
1818
printf "deb [arch=amd64] https://repo.radeon.com/amdgpu/$AMDGPU_VERSION/ubuntu jammy main" | tee /etc/apt/sources.list.d/amdgpu.list && \
1919
apt-get update && apt-get install -y --no-install-recommends \
20-
sudo \
20+
sudo git \
2121
libelf1 \
2222
kmod \
2323
file zip unzip \
@@ -97,7 +97,6 @@ RUN pip install packaging \
9797
scipy==1.14.1 \
9898
numpy==1.26.4
9999

100-
RUN apt install -y git
101100
ARG BUILD_UID=1000
102101
ARG BUILD_USER=onnxruntimedev
103102
RUN adduser --gecos 'onnxruntime Build User' --disabled-password $BUILD_USER --uid $BUILD_UID

0 commit comments

Comments
 (0)