Last active
August 12, 2023 18:56
-
-
Save marcc-hpc/a1c0a0eafb19e5d3d777fa20a674882f to your computer and use it in GitHub Desktop.
PyRosetta Singularity File with Anaconda and OpenMPI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bootstrap: docker | |
From: centos:centos7 | |
%environment | |
PATH="/opt/software/bin:$PATH" | |
export PATH | |
LD_LIBRARY_PATH="/opt/software/lib/openmpi:$LD_LIBRARY_PATH" | |
export LD_LIBRARY_PATH | |
%files | |
PyRosetta4.Release.python27.linux.release-175.tar.bz2 /opt | |
%post | |
yum -y groupinstall "Development Tools" | |
yum -y install wget vim zeromq | |
# download and install Anaconda | |
CONDA_INSTALL_PATH="/opt/software" | |
wget https://repo.continuum.io/archive/Anaconda2-5.1.0-Linux-x86_64.sh | |
chmod +x Anaconda2-5.1.0-Linux-x86_64.sh | |
./Anaconda2-5.1.0-Linux-x86_64.sh -b -p $CONDA_INSTALL_PATH | |
# download openmpi | |
wget https://www.open-mpi.org/software/ompi/v2.1/downloads/openmpi-2.1.2.tar.bz2 | |
tar jxf openmpi-2.1.2.tar.bz2 | |
cd openmpi-2.1.2 | |
./configure --prefix=/opt/software | |
make | |
make install | |
# example ring | |
cd examples | |
/opt/software/bin/mpicc ring_c.c -o ring | |
cp ring /opt/software/bin | |
# marcc uses centos 6, no overlay support | |
mkdir -p /scratch /work-zfs /my-apps /my-work /home-0 /home-1 /home-2 /home-3 /home-4 | |
# update conda | |
/opt/software/bin/conda update -y -n base conda | |
# install jupyter notebook | |
/opt/software/bin/conda install -y jupyter | |
/opt/software/bin/conda install -y numpy | |
/opt/software/bin/conda install -y matplotlib | |
/opt/software/bin/conda install -y scipy | |
/opt/software/bin/conda install -y zeromq | |
/opt/software/bin/conda install -y pyzmq | |
/opt/software/bin/conda install -y ipyparallel | |
# install pyrosetta | |
cd /opt | |
tar xf PyRosetta4.Release.python27.linux.release-175.tar.bz2 | |
cd /opt/PyRosetta4.Release.python27.linux.release-175/setup | |
/opt/software/bin/python setup.py install | |
# install mpi4py | |
env MPICC=/opt/software/bin/mpicc /opt/software/bin/pip install mpi4py -t /opt/software/lib/python2.7/site-packages/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Previous OpenMPI didn't work because
conda install mpi4py
installs MPICH2, and we picked the same software install location at/opt/software
!