# Torch Container # # ===================== # # # # This container offers a build of Torch of of CentOS 7 # # from the official Dockers containers. # # # # singularity build centos8_torch.simg torch.recipe # # # ##################################################################### Bootstrap: docker From: centos:7 %help Helpful information to come. This container is running the following: - CentOS 7.0.0 - HDF5 1.8.12 - Hypre 2.11.2 - netCDF CXX 4.2.8 - netCDF C 4.3.3 - netCDF F90 4.2-16 - zlib 1.2.7 - FLASH 4.6.2 - OpenMPI3 3.1.3 %labels CREATOR Joe Glaser %runscript exec echo "The runscript is the containers default runtime command!" %files FLASH4.6.2.tar.gz /opt/ singularity.centos7/Makefile.h /opt/ %environment SHELL=/bin/bash export SHELL export PATH="/usr/local/anaconda/bin:$PATH" export AMUSE_DIR=/opt/amuse export FLASH_DIR=/opt/FLASH4.6.2 export TORCH_DIR=/opt/torch export PYTHONPATH="/opt/amuse/src:$PYTHONPATH" module load mpi %post echo "The post section is where you can install, and configure your container." # Install the EPEL Repo yum search epel-release yum info epel-release yum -y install epel-release # Do an Update and Upgrade yum -y update yum -y upgrade # Install Useful Commands yum -y install sudo which nano wget bzip2 git cmake \ ca-certificates libglib2.0-0 libxext6 libsm6 libxrender1 # Install AMUSE Base Requirements yum -y install curl libcurl* devtoolset-8 gettext* zlib* # Install OpenMPI3 and Append the Path Variable yum -y install openmpi3* export PATH=/usr/lib64/openmpi3/bin:$PATH # Install HDF5 with OpenMPI3 Support yum -y install hdf5 hdf5-devel hdf5-openmpi3* # Install NetCDF (No OpenMPI Support Due to Dependence on v1.10) yum -y install netcdf netcdf-devel \ netcdf-cxx-devel netcdf-cxx-static netcdf-cxx \ netcdf-fortran-devel netcdf-fortran-static netcdf-fortran # Install FFTW yum -y install fftw fftw-devel fftw-libs* # Install GSL, GMP & MPFR yum -y install gsl gsl-devel gmp gmp-devel mpfr mpfr-devel # Install FLASH Requirements yum -y install hypre hypre-devel papi papi-devel papi-static libIDL libIDL-devel # Install CUDA wget https://developer.download.nvidia.com/compute/cuda/11.1.1/local_installers/cuda-repo-rhel7-11-1-local-11.1.1_455.32.00-1.x86_64.rpm rpm -i cuda-repo-rhel7-11-1-local-11.1.1_455.32.00-1.x86_64.rpm yum clean all yum -y install nvidia-driver-latest-dkms cuda yum -y install cuda-drivers # install anaconda if [ ! -d /usr/local/anaconda ]; then wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \ -O ~/anaconda.sh && \ bash ~/anaconda.sh -b -p /usr/local/anaconda && \ rm ~/anaconda.sh fi # Set Anaconda Path export PATH="/usr/local/anaconda/bin:$PATH" # install the bare minimum pip install numpy scipy astropy matplotlib env MPICC=/usr/lib64/openmpi3/bin/mpicc pip install mpi4py pip install h5py pytest docutils quilt gsl conda install gmp mpfr nose conda clean --tarballs # Install AMUSE cd /opt git clone https://github.com/amusecode/amuse.git cd amuse ./configure --enable-cuda make framework make kepler.code make ph4.code make seba.code make smalln.code pip install rebound # Install FLASH cd /opt tar -zxvf FLASH4.6.2.tar.gz cd FLASH4.6.2 mkdir sites/singularity.centos7 mv /opt/Makefile.h sites/singularity.centos7/Makefile.h ./setup -auto -3d Sedov --site=singularity.centos7 #cd object #make # Install Torch cd /opt git clone https://bitbucket.org/torch-sf/torch.git cd torch export AMUSE_DIR=/opt/amuse export FLASH_DIR=/opt/FLASH4.6.2 export TORCH_DIR=/opt/torch yes | ./install.sh # Install AMUSE FLASH_Worker # export FLASH_DIR=/opt/FLASH4.6.2 # cd /opt/amuse/ # make flash.code