|
1 | 1 | FROM ghcr.io/actions/actions-runner:latest |
2 | 2 |
|
3 | 3 | ENV CXX=clang++ |
| 4 | +ENV UCX_CXX=g++ |
| 5 | +ENV UCX_CC=gcc |
4 | 6 |
|
5 | 7 | RUN sudo apt-get update -y \ |
6 | 8 | && sudo apt-get install -y software-properties-common \ |
@@ -57,3 +59,61 @@ RUN sudo pip install \ |
57 | 59 | packaging \ |
58 | 60 | wheel \ |
59 | 61 | tinygrad |
| 62 | + |
| 63 | +RUN sudo apt-get update -y \ |
| 64 | + && sudo apt-get install -y --no-install-recommends \ |
| 65 | + autoconf \ |
| 66 | + automake \ |
| 67 | + libtool \ |
| 68 | + pkg-config \ |
| 69 | + build-essential \ |
| 70 | + gfortran \ |
| 71 | + flex \ |
| 72 | + bison \ |
| 73 | + libomp-dev \ |
| 74 | + libhwloc-dev \ |
| 75 | + libnuma-dev \ |
| 76 | + && sudo rm -rf /var/lib/apt/lists/* |
| 77 | + |
| 78 | +ENV UCX_INSTALL_DIR=/opt/ucx |
| 79 | +ENV OMPI_INSTALL_DIR=/opt/openmpi |
| 80 | +ENV ROCSHMEM_INSTALL_DIR=/opt/rocshmem |
| 81 | +ENV ROCM_PATH=/opt/rocm |
| 82 | + |
| 83 | +RUN cd /tmp \ |
| 84 | + && git clone https://github.com/openucx/ucx.git -b v1.17.x \ |
| 85 | + && cd ucx \ |
| 86 | + && ./autogen.sh \ |
| 87 | + && CC=gcc CXX=g++ ./configure --prefix=${UCX_INSTALL_DIR} --with-rocm=${ROCM_PATH} --enable-mt --disable-optimizations \ |
| 88 | + && make -j$(nproc) \ |
| 89 | + && sudo make install \ |
| 90 | + && cd / \ |
| 91 | + && sudo rm -rf /tmp/ucx |
| 92 | + |
| 93 | +RUN cd /tmp \ |
| 94 | + && git clone --recursive https://github.com/open-mpi/ompi.git -b v5.0.x \ |
| 95 | + && cd ompi \ |
| 96 | + && ./autogen.pl \ |
| 97 | + && ./configure --prefix=${OMPI_INSTALL_DIR} --with-rocm=${ROCM_PATH} --with-ucx=${UCX_INSTALL_DIR} \ |
| 98 | + && make -j$(nproc) \ |
| 99 | + && sudo make install \ |
| 100 | + && cd / \ |
| 101 | + && sudo rm -rf /tmp/ompi |
| 102 | + |
| 103 | +ENV PATH="${OMPI_INSTALL_DIR}/bin:${PATH}" |
| 104 | +ENV LD_LIBRARY_PATH="${OMPI_INSTALL_DIR}/lib:${UCX_INSTALL_DIR}/lib:/opt/rocm/lib" |
| 105 | + |
| 106 | + |
| 107 | +RUN cd /tmp \ |
| 108 | + && git clone https://github.com/ROCm/rocSHMEM.git \ |
| 109 | + && cd rocSHMEM \ |
| 110 | + && mkdir build \ |
| 111 | + && cd build \ |
| 112 | + && MPI_ROOT=${OMPI_INSTALL_DIR} UCX_ROOT=${UCX_INSTALL_DIR} CMAKE_PREFIX_PATH="${ROCM_PATH}:$CMAKE_PREFIX_PATH" \ |
| 113 | + ../scripts/build_configs/ipc_single ${ROCSHMEM_INSTALL_DIR} \ |
| 114 | + && cd / \ |
| 115 | + && sudo rm -rf /tmp/rocSHMEM |
| 116 | + |
| 117 | + |
| 118 | +ENV ROCSHMEM_INSTALL_DIR=${ROCSHMEM_INSTALL_DIR} |
| 119 | +ENV LD_LIBRARY_PATH="${ROCSHMEM_INSTALL_DIR}/lib:${LD_LIBRARY_PATH}" |
0 commit comments