mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-03 03:58:54 +00:00
### Description Use pytest-xdist to distribute tests across multiple CPUs to speed up test execution. Use pytest-rerunfailures to rerun failed test in case of pytest-xdist crash. `pytest -n 16` can reduce pytest time from 80 minutes to 20 minutes. ### Motivation and Context Now kernel explorer pytest of ROCm CI takes nearly 1 hour 20 minutes. It will take longer time when we add more tunableOp in the future.
45 lines
1.3 KiB
Docker
45 lines
1.3 KiB
Docker
FROM rocm/pytorch:rocm5.4_ubuntu20.04_py3.7_pytorch_1.12.1
|
|
|
|
WORKDIR /stage
|
|
|
|
# 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
|
|
|
|
# CMake
|
|
ENV CMAKE_VERSION=3.24.2
|
|
RUN cd /usr/local && \
|
|
wget -q -O - https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz | tar zxf -
|
|
ENV PATH=/usr/local/cmake-${CMAKE_VERSION}-linux-x86_64/bin:${PATH}
|
|
|
|
# rocm-ci branch contains instrumentation needed for loss curves and perf
|
|
RUN git clone https://github.com/microsoft/huggingface-transformers.git &&\
|
|
cd huggingface-transformers &&\
|
|
git checkout rocm-ci &&\
|
|
pip install -e .
|
|
|
|
RUN pip install \
|
|
numpy \
|
|
onnx \
|
|
cerberus \
|
|
sympy \
|
|
h5py \
|
|
datasets==1.9.0 \
|
|
requests \
|
|
sacrebleu==1.5.1 \
|
|
sacremoses \
|
|
scipy \
|
|
scikit-learn \
|
|
tokenizers \
|
|
sentencepiece \
|
|
dill==0.3.4 \
|
|
wget \
|
|
pytorch_lightning==1.6.0 \
|
|
pytest-xdist \
|
|
pytest-rerunfailures
|
|
|
|
RUN pip install torch-ort --no-dependencies
|
|
ENV ORTMODULE_ONNX_OPSET_VERSION=15
|