mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-18 21:21:17 +00:00
MIGraphX CI - Change docker container user name to `onnxruntimedev` ROCm CI - Build docker image every job instead of using prebuild image. - Every job create a container with only one GPU with command `docker run -it --device=/dev/kfd --device=/dev/dri/renderDxxx` - Remove tests that are unstable or use outdated interfaces. - Enable training ortmodule test.
44 lines
1.4 KiB
Docker
44 lines
1.4 KiB
Docker
FROM rocm/pytorch:rocm5.5_ubuntu20.04_py3.8_pytorch_1.13.1
|
|
|
|
# MIGraphX version should be the same as ROCm version
|
|
ARG MIGRAPHX_VERSION=rocm-5.5.0
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
ENV MIGRAPHX_DISABLE_FAST_GELU=1
|
|
|
|
RUN apt-get clean && apt-get update && apt-get install -y locales unzip
|
|
RUN locale-gen en_US.UTF-8
|
|
RUN update-locale LANG=en_US.UTF-8
|
|
ENV LC_ALL C.UTF-8
|
|
ENV LANG C.UTF-8
|
|
|
|
WORKDIR /stage
|
|
|
|
ADD scripts /tmp/scripts
|
|
RUN /tmp/scripts/install_os_deps.sh
|
|
|
|
# from rocm/pytorch's image, work around ucx's dlopen replacement conflicting with shared provider
|
|
RUN cd /opt/mpi_install/ucx/build &&\
|
|
make clean &&\
|
|
../contrib/configure-release --prefix=/opt/ucx --without-rocm &&\
|
|
make -j $(nproc) &&\
|
|
make install
|
|
|
|
RUN apt-get update &&\
|
|
apt-get install -y half libnuma-dev
|
|
|
|
# Install rbuild
|
|
RUN pip3 install https://github.com/RadeonOpenCompute/rbuild/archive/master.tar.gz numpy yapf==0.28.0
|
|
|
|
# Install MIGraphX from source
|
|
RUN mkdir -p /migraphx
|
|
RUN cd /migraphx && git clone --depth=1 --branch ${MIGRAPHX_VERSION} https://github.com/ROCmSoftwarePlatform/AMDMIGraphX src
|
|
RUN cd /migraphx && rbuild package --cxx /opt/rocm/llvm/bin/clang++ -d /migraphx/deps -B /migraphx/build -S /migraphx/src/ -DPYTHON_EXECUTABLE=/usr/bin/python3
|
|
RUN dpkg -i /migraphx/build/*.deb
|
|
RUN rm -rf /migraphx
|
|
|
|
ARG BUILD_UID=1001
|
|
ARG BUILD_USER=onnxruntimedev
|
|
RUN adduser --uid $BUILD_UID $BUILD_USER
|
|
WORKDIR /home/$BUILD_USER
|
|
USER $BUILD_USER
|