File tree Expand file tree Collapse file tree 5 files changed +70
-9
lines changed Expand file tree Collapse file tree 5 files changed +70
-9
lines changed Original file line number Diff line number Diff line change 2121 docker build \
2222 -t exaworks/sdk-base:${{ matrix.dockerbase }} \
2323 --cache-from exaworks/sdk-base:${{ matrix.dockerbase }} \
24- docker/base/${{ matrix.dockerbase }}
24+ -f docker/base/${{ matrix.dockerbase }}/Dockerfile \
25+ docker/base/
2526 docker build \
2627 -t rp:${{ matrix.dockerbase }} \
2728 --build-arg BASE_IMAGE=exaworks/sdk-base:${{ matrix.dockerbase }} \
Original file line number Diff line number Diff line change 3737 id : docker_build
3838 uses : docker/build-push-action@v2
3939 with :
40- context : ./docker/base/${{ matrix.dockerbase }}
40+ context : ./docker/base/
41+ file : ./docker/base/${{ matrix.dockerbase }}/Dockerfile
4142 push : true
4243 tags : |
4344 exaworks/sdk-base:${{ matrix.dockerbase }}
Original file line number Diff line number Diff line change 11FROM centos:7
22
33ARG MPI=openmpi-devel
4- ARG MPI_PREFIX=/usr/lib64/openmpi /
4+ ARG MPI_PREFIX=/usr/local /
55ENV VIRTUAL_ENV=/ve_exaworks
6- ENV PATH="$VIRTUAL_ENV/bin:$MPI_PREFIX/bin:$ PATH"
6+ ENV PATH="$VIRTUAL_ENV/bin:$PATH"
77ENV MPI_PREFIX=${MPI_PREFIX}
88ENV MPICC=$MPI_PREFIX/bin/mpicc
99
@@ -70,8 +70,6 @@ RUN yum -y update \
7070 # Radical Pilot Deps
7171 python3-pip \
7272 mongodb-org \
73- # MPI Dep
74- ${MPI} \
7573 && yum clean all \
7674 && python3 -m venv ${VIRTUAL_ENV} \
7775 && pip install --upgrade pip setuptools pytest \
@@ -86,3 +84,5 @@ RUN wget https://archive.apache.org/dist/ant/binaries/apache-ant-1.9.15-bin.tar.
8684 && ln -s /opt/apache-ant-1.9.15 /opt/ant \
8785 && sudo ln -s /opt/ant/bin/ant /usr/bin/ant
8886
87+ COPY ./scripts/install-mpi.sh /install-mpi.sh
88+ RUN bash install-mpi.sh ${MPI}
Original file line number Diff line number Diff line change 11FROM centos:8
22
33ARG MPI=openmpi-devel
4- ARG MPI_PREFIX=/usr/lib64/openmpi /
4+ ARG MPI_PREFIX=/usr/local /
55ENV VIRTUAL_ENV=/ve_exaworks
66ENV PATH="$VIRTUAL_ENV/bin:$PATH"
77ENV MPI_PREFIX=${MPI_PREFIX}
@@ -71,8 +71,6 @@ RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.n
7171 # RADICAL-Pilot Dependencies
7272 python3-pip \
7373 mongodb-org \
74- # MPI Dep
75- ${MPI} \
7674 && dnf clean all \
7775 && python3 -m venv ${VIRTUAL_ENV} \
7876 && pip install --upgrade pip setuptools pytest \
@@ -87,3 +85,5 @@ RUN wget https://archive.apache.org/dist/ant/binaries/apache-ant-1.9.15-bin.tar.
8785 && ln -s /opt/apache-ant-1.9.15 /opt/ant \
8886 && sudo ln -s /opt/ant/bin/ant /usr/bin/ant
8987
88+ COPY ./scripts/install-mpi.sh /install-mpi.sh
89+ RUN bash install-mpi.sh ${MPI}
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ if [[ -z $1 ]]; then
4+ echo " Must provide MPI that you want to install" 1>&2
5+ exit 1
6+ fi
7+
8+ function centos_major_version() {
9+ cat /etc/centos-release | cut -f 4 -d " " | cut -f 1 -d .
10+ }
11+
12+ # Install only the dependencies for a given package
13+ # Source: https://serverfault.com/questions/429123/howto-get-yum-to-install-only-dependencies-for-a-given-pakage
14+ yum_install_only_deps () {
15+ if [[ -z " $1 " ]]; then
16+ echo " Package required for installing deps" 1>&2
17+ exit 1
18+ fi
19+ yum deplist $1 | grep provider | awk ' {print $2}' | sort | uniq | grep -v $PACKAGE | sed ' :a;N;$!ba;s/\n/ /g' | xargs yum -y install
20+ }
21+
22+ if [[ " $1 " == " openmpi-devel" ]]; then
23+ if [[ $( centos_major_version) == " 7" ]]; then
24+ yum install -y slurm-pmi-devel
25+ MAJOR_MINOR=1.10
26+ PATCH=7
27+ CONFIGURE_ARGS=" --with-pmi --with-pmi-libdir=/usr/lib64"
28+ elif [[ $( centos_major_version) == " 8" ]]; then
29+ yum_install_only_deps $1
30+ MAJOR_MINOR=4.0
31+ PATCH=6
32+ CONFIGURE_ARGS=" "
33+ else
34+ echo " Unknown CentOS version. Exiting" 1>&2
35+ exit 1
36+ fi
37+
38+ OPENMPI=openmpi-${MAJOR_MINOR} .${PATCH}
39+
40+ wget https://download.open-mpi.org/release/open-mpi/v${MAJOR_MINOR} /${OPENMPI} .tar.gz
41+ tar -xf ./${OPENMPI} .tar.gz
42+ rm ./${OPENMPI} .tar.gz
43+
44+ cd ${OPENMPI}
45+ ./configure ${CONFIGURE_ARGS}
46+ make -j 4
47+ make install
48+ cd ..
49+ rm -rf ${OPENMPI}
50+
51+ if [[ $( centos_major_version) == " 7" ]]; then
52+ yum remove -y slurm-pmi-devel
53+ yum autoremove -y
54+ yum clean all
55+ fi
56+ else
57+ echo " Unknown/unsupported MPI. Existing without installing."
58+ exit 1
59+ fi
You can’t perform that action at this time.
0 commit comments