File tree 4 files changed +84
-4
lines changed
4 files changed +84
-4
lines changed Original file line number Diff line number Diff line change @@ -70,8 +70,6 @@ RUN yum -y update \
70
70
# Radical Pilot Deps
71
71
python3-pip \
72
72
mongodb-org \
73
- # MPI Dep
74
- ${MPI} \
75
73
&& yum clean all \
76
74
&& python3 -m venv ${VIRTUAL_ENV} \
77
75
&& 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.
86
84
&& ln -s /opt/apache-ant-1.9.15 /opt/ant \
87
85
&& sudo ln -s /opt/ant/bin/ant /usr/bin/ant
88
86
87
+ COPY ./install-mpi.sh /install-mpi.sh
88
+ 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"
5
+ exit 1
6
+ fi
7
+
8
+ # Install only the dependencies for a given package
9
+ # Source: https://serverfault.com/questions/429123/howto-get-yum-to-install-only-dependencies-for-a-given-pakage
10
+ yum_install_only_deps () {
11
+ if [[ -z " $1 " ]]; then
12
+ echo " Package required for installing deps"
13
+ exit 1
14
+ fi
15
+ yum deplist $1 | grep provider | awk ' {print $2}' | sort | uniq | grep -v $PACKAGE | sed ' :a;N;$!ba;s/\n/ /g' | xargs yum -y install
16
+ }
17
+
18
+ if [[ " $1 " == " openmpi-devel" ]]; then
19
+ yum install -y slurm-pmi-devel
20
+
21
+ MAJOR_MINOR=1.10
22
+ PATCH=7
23
+ OPENMPI=openmpi-${MAJOR_MINOR} .${PATCH}
24
+
25
+ wget https://download.open-mpi.org/release/open-mpi/v${MAJOR_MINOR} /${OPENMPI} .tar.gz
26
+ tar -xf ./${OPENMPI} .tar.gz
27
+ rm ./${OPENMPI} .tar.gz
28
+
29
+ cd ${OPENMPI}
30
+ ./configure
31
+ make -j 4
32
+ make install
33
+ cd ..
34
+ rm -rf ${OPENMPI}
35
+
36
+ yum remove -y slurm-pmi-devel
37
+ yum autoremove -y
38
+ yum clean all
39
+ else
40
+ echo " Unknown/unsupported MPI. Existing without installing."
41
+ exit 1
42
+ fi
Original file line number Diff line number Diff line change @@ -71,8 +71,6 @@ RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.n
71
71
# RADICAL-Pilot Dependencies
72
72
python3-pip \
73
73
mongodb-org \
74
- # MPI Dep
75
- ${MPI} \
76
74
&& dnf clean all \
77
75
&& python3 -m venv ${VIRTUAL_ENV} \
78
76
&& 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.
87
85
&& ln -s /opt/apache-ant-1.9.15 /opt/ant \
88
86
&& sudo ln -s /opt/ant/bin/ant /usr/bin/ant
89
87
88
+ COPY ./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"
5
+ exit 1
6
+ fi
7
+
8
+ # Install only the dependencies for a given package
9
+ # Source: https://serverfault.com/questions/429123/howto-get-yum-to-install-only-dependencies-for-a-given-pakage
10
+ yum_install_only_deps () {
11
+ if [[ -z " $1 " ]]; then
12
+ echo " Package required for installing deps"
13
+ exit 1
14
+ fi
15
+ yum deplist $1 | grep provider | awk ' {print $2}' | sort | uniq | grep -v $PACKAGE | sed ' :a;N;$!ba;s/\n/ /g' | xargs yum -y install
16
+ }
17
+
18
+ if [[ " $1 " == " openmpi-devel" ]]; then
19
+ yum_install_only_deps $1
20
+
21
+ MAJOR_MINOR=4.0
22
+ PATCH=6
23
+ OPENMPI=openmpi-${MAJOR_MINOR} .${PATCH}
24
+
25
+ wget https://download.open-mpi.org/release/open-mpi/v${MAJOR_MINOR} /${OPENMPI} .tar.gz
26
+ tar -xf ./${OPENMPI} .tar.gz
27
+ rm ./${OPENMPI} .tar.gz
28
+
29
+ cd ${OPENMPI}
30
+ ./configure
31
+ make -j 4
32
+ make install
33
+ cd ..
34
+ rm -rf ${OPENMPI}
35
+ else
36
+ echo " Unknown/unsupported MPI. Existing without installing."
37
+ exit 1
38
+ fi
You can’t perform that action at this time.
0 commit comments