File tree Expand file tree Collapse file tree 4 files changed +84
-4
lines changed Expand file tree Collapse file tree 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 \
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  ./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
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  ./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