Skip to content
Snippets Groups Projects
Commit 0748755c authored by Lukáš Krupčík's avatar Lukáš Krupčík
Browse files

Merge branch 'it4i-karolina'

parents 748f901f 893722df
No related branches found
No related tags found
No related merge requests found
Bootstrap: docker
From: centos:6.9
%post
# CentOS repo
yum -y install vim python python-devel wget tcl tk tcl-devel tk-devel make gcc g++ git
# Development tools
yum -y groupinstall "Development Tools"
# MPI support
yum -y install numactl-devel
cd /tmp
# OpenMPI
wget https://www.open-mpi.org/software/ompi/v3.1/downloads/openmpi-3.1.4.tar.gz
tar xvf openmpi-3.1.4.tar.gz && cd openmpi-3.1.4
./configure --prefix=/usr/local
make -j 16
make install
cd /tmp
# lua
yum -y install lua lua-devel
# lua posix and dependencies
wget https://github.com/luarocks/luarocks/archive/v2.4.2.tar.gz
tar xvf v2.4.2.tar.gz
cd luarocks-2.4.2
./configure
make build
make install
mkdir ~/.luarocks
echo "fs_use_modules = false" > ~/.luarocks/config.lua
luarocks install luaposix
luarocks install luafilesystem
LUAROCKS_PREFIX=/usr/local
export LUA_PATH="$LUAROCKS_PREFIX/share/lua/5.1/?.lua;$LUAROCKS_PREFIX/share/lua/5.1/?/init.lua;;"
export LUA_CPATH="$LUAROCKS_PREFIX/lib/lua/5.1/?.so;;"
# Lmod
wget https://github.com/TACC/Lmod/archive/7.7.7.tar.gz
tar xvf 7.7.7.tar.gz
cd Lmod-7.7.7
./configure --prefix=/opt/apps
make install
# APPS and SCRATCH
mkdir /apps
mkdir /scratch
%environment
source /opt/apps/lmod/7.7.7/init/profile
export LMOD_PACKAGE_PATH=/opt/apps/lmod/
if [ "$(id -u)" -ne 0 ]; then
MODULEPATH=""
for dir in /apps/modules/*
do
# Exclude following directories
if [[ (${dir##*/} == "all") ]]; then
continue
fi
# In case that it's directory
if [ -d "$dir" ]; then
if [ -z "$MODULEPATH" ]; then
MODULEPATH="$dir"
else
MODULEPATH="$MODULEPATH:$dir"
fi
fi
done
# export
export MODULEPATH
fi
ml purge
...@@ -16,26 +16,20 @@ yum -y install numactl-devel ...@@ -16,26 +16,20 @@ yum -y install numactl-devel
cd /tmp cd /tmp
# UCX # UCX
wget https://github.com/openucx/ucx/archive/v1.6.1.tar.gz wget https://github.com/openucx/ucx/archive/refs/tags/v1.11.2.tar.gz
tar xvf v1.6.1.tar.gz && cd ucx-1.6.1 tar xvf v1.11.2.tar.gz && cd ucx-1.11.2
./autogen.sh ./autogen.sh
./configure --prefix=/usr/local ./configure --prefix=/usr/local
make -j 36 make -j 64
make install make install
# OpenMPI # OpenMPI
wget https://www.open-mpi.org/software/ompi/v3.1/downloads/openmpi-3.1.4.tar.gz wget https://github.com/open-mpi/ompi/archive/refs/tags/v4.1.2.tar.gz
tar xvf openmpi-3.1.4.tar.gz && cd openmpi-3.1.4 tar xvf openmpi-4.1.2.tar.gz && cd openmpi-4.1.2
./configure --prefix=/usr/local --with-ucx=/usr/local ./configure --prefix=/usr/local --with-ucx=/usr/local
make -j 16 make -j 64
make install make install
# pip
curl -s -O https://bootstrap.pypa.io/get-pip.py
python get-pip.py
pip install setuptools --upgrade
# lua # lua
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/lua-posix-32-2.el7.x86_64.rpm wget http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/lua-posix-32-2.el7.x86_64.rpm
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/lua-filesystem-1.6.2-2.el7.x86_64.rpm wget http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/lua-filesystem-1.6.2-2.el7.x86_64.rpm
...@@ -50,18 +44,17 @@ rpm -ihv lua-posix-32-2.el7.x86_64.rpm ...@@ -50,18 +44,17 @@ rpm -ihv lua-posix-32-2.el7.x86_64.rpm
cd /tmp cd /tmp
# Lmod # Lmod
wget https://github.com/TACC/Lmod/archive/7.7.7.tar.gz wget https://github.com/TACC/Lmod/archive/8.5.tar.gz
tar xvf 7.7.7.tar.gz tar xvf 8.5.tar.gz
cd Lmod-7.7.7 cd Lmod-8.5
./configure --prefix=/opt/apps ./configure --prefix=/opt/apps
make install make install
# APPS and SCRATCH # mounts
mkdir /apps mkdir /mnt/proj1 /mnt/proj2 /mnt/proj3 /scratch /apps
mkdir /scratch
%environment %environment
source /opt/apps/lmod/7.7.7/init/profile source /opt/apps/lmod/8.5/init/profile
export LMOD_PACKAGE_PATH=/opt/apps/lmod/ export LMOD_PACKAGE_PATH=/opt/apps/lmod/
if [ "$(id -u)" -ne 0 ]; then if [ "$(id -u)" -ne 0 ]; then
......
...@@ -32,9 +32,9 @@ rpm -ihv lua-bitop-1.0.2-3.el7.x86_64.rpm ...@@ -32,9 +32,9 @@ rpm -ihv lua-bitop-1.0.2-3.el7.x86_64.rpm
rpm -ihv lua-posix-32-2.el7.x86_64.rpm rpm -ihv lua-posix-32-2.el7.x86_64.rpm
# Lmod # Lmod
wget https://github.com/TACC/Lmod/archive/7.7.7.tar.gz wget https://github.com/TACC/Lmod/archive/8.5.tar.gz
tar xvf 7.7.7.tar.gz tar xvf 8.5.tar.gz
cd Lmod-7.7.7 cd Lmod-8.5
./configure --prefix=/opt/apps ./configure --prefix=/opt/apps
make install make install
...@@ -43,7 +43,7 @@ mkdir /apps ...@@ -43,7 +43,7 @@ mkdir /apps
mkdir /scratch mkdir /scratch
%environment %environment
source /opt/apps/lmod/7.7.7/init/profile source /opt/apps/lmod/8.5/init/profile
export LMOD_PACKAGE_PATH=/opt/apps/lmod/ export LMOD_PACKAGE_PATH=/opt/apps/lmod/
if [ "$(id -u)" -ne 0 ]; then if [ "$(id -u)" -ne 0 ]; then
......
...@@ -20,18 +20,18 @@ yum -y install libXdmcp libXfont2 libXxf86misc libxkbfile libXtst libX11-devel m ...@@ -20,18 +20,18 @@ yum -y install libXdmcp libXfont2 libXxf86misc libxkbfile libXtst libX11-devel m
cd /tmp cd /tmp
# UCX # UCX
wget https://github.com/openucx/ucx/archive/v1.6.1.tar.gz wget https://github.com/openucx/ucx/archive/v1.11.2.tar.gz
tar xvf v1.6.1.tar.gz && cd ucx-1.6.1 tar xvf v1..11.2.tar.gz && cd ucx-1.11.2
./autogen.sh ./autogen.sh
./configure --prefix=/usr/local ./configure --prefix=/usr/local
make -j 16 make -j 64
make install make install
# OpenMPI # OpenMPI
wget https://www.open-mpi.org/software/ompi/v3.1/downloads/openmpi-3.1.4.tar.gz wget https://github.com/open-mpi/ompi/archive/refs/tags/v4.1.2.tar.gz
tar xvf openmpi-3.1.4.tar.gz && cd openmpi-3.1.4 tar xvf openmpi-4.1.2.tar.gz && cd openmpi-4.1.2
./configure --prefix=/usr/local --with-ucx=/usr/local ./configure --prefix=/usr/local --with-ucx=/usr/local
make -j 16 make -j 64
make install make install
# pip # pip
...@@ -48,9 +48,9 @@ pip3 install setuptools numpy scipy pandas wheel --upgrade ...@@ -48,9 +48,9 @@ pip3 install setuptools numpy scipy pandas wheel --upgrade
#rpm -ihv lua-filesystem-1.6.3-7.el8.x86_64.rpm #rpm -ihv lua-filesystem-1.6.3-7.el8.x86_64.rpm
# Lmod # Lmod
wget https://github.com/TACC/Lmod/archive/7.7.7.tar.gz wget https://github.com/TACC/Lmod/archive/8.5.tar.gz
tar xvf 7.7.7.tar.gz tar xvf 8.5.tar.gz
cd Lmod-7.7.7 cd Lmod-8.5
./configure --prefix=/opt/apps ./configure --prefix=/opt/apps
make install make install
...@@ -59,10 +59,9 @@ mkdir /apps ...@@ -59,10 +59,9 @@ mkdir /apps
mkdir /scratch mkdir /scratch
%environment %environment
source /opt/apps/lmod/7.7.7/init/profile source /opt/apps/lmod/8.5/init/profile
clearMT clearMT
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export -f ml export -f ml
export -f module export -f module
export -f clearMT export -f clearMT
SINGULARITY_BIN_PATH=/apps/all/Singularity/3.6.0/bin SINGULARITY_BIN_PATH=/apps/all/Singularity/3.8.7/bin
IMAGE_PATH=/apps/all/OS IMAGE_PATH=/apps/all/OS
MODULEFILE_PATH=/apps/modules MODULEFILE_PATH=/apps/modules
USER_IMAGE=easybuild USER_IMAGE=easybuild
EBROOTSQUASHFSMINTOOLS=/apps/all/squashfs-tools/4.3 EBROOTSQUASHFSMINTOOLS=/apps/all/squashfs-tools/4.3
PATH=$PATH:/apps/all/Singularity/3.6.0/bin:/apps/all/squashfs-tools/4.3/bin PATH=$PATH:/apps/all/Singularity/3.8.7/bin:/apps/all/squashfs-tools/4.3/bin
...@@ -9,10 +9,10 @@ if [[ $# -eq 0 ]]; then ...@@ -9,10 +9,10 @@ if [[ $# -eq 0 ]]; then
printf "\e[31m printf "\e[31m
./install.sh\e[0m ... create and build singularity image ./install.sh\e[0m ... create and build singularity image
-\e[33mi\e[0m OS (\e[33mCentOS\e[0m, \e[33mUbuntu\e[0m) -\e[33mi\e[0m OS (\e[33mCentOS\e[0m, \e[33mUbuntu\e[0m)
-\e[33mv\e[0m Version OS (CentOS 6, CentOS 7, CentOS 8, Ubuntu latest, Ubuntu 18, Debian latest, Fedora latest) -\e[33mv\e[0m Version OS (CentOS 7, CentOS 8, Ubuntu latest, Ubuntu 18, Debian latest, Fedora latest)
-\e[33mo\e[0m OpenMPI module -\e[33mo\e[0m OpenMPI module
Example: Example:
\e[33m ./install.sh -i CentOS -v 6\e[0m \e[33m ./install.sh -i CentOS -v 7777777\e[0m
" "
echo "" echo ""
exit 0 exit 0
...@@ -90,9 +90,9 @@ else ...@@ -90,9 +90,9 @@ else
fi fi
if [ -z "$VERSION" ]; then if [ -z "$VERSION" ]; then
echo -e "Please, specify OS version (-v CentOS \e[31m6\e[0m or CentOS \e[31m7\e[0m, CentOS \e[31m8\e[0m, Ubuntu \e[31mlatest\e[0m, Debian \e[31mlatest\e[0m), Fedora \e[31mlatest\e[0m))" echo -e "Please, specify OS version (-v CentOS \e[31m7\e[0m, CentOS \e[31m8\e[0m, Ubuntu \e[31mlatest\e[0m, Debian \e[31mlatest\e[0m), Fedora \e[31mlatest\e[0m))"
exit 1 exit 1
elif ([ "$IMAGE" == "CentOS" ] && [ "$VERSION" == "6" ]) || ([ "$IMAGE" == "CentOS" ] && [ "$VERSION" == "7" ]) || ([ "$IMAGE" == "CentOS" ] && [ "$VERSION" == "8" ]) || ([ "$IMAGE" == "Ubuntu" ] && [ "$VERSION" == "latest" ]) || ([ "$IMAGE" == "Ubuntu" ] && [ "$VERSION" == "18" ]) || ([ "$IMAGE" == "Debian" ] && [ "$VERSION" == "latest" ]) || ([ "$IMAGE" == "Fedora" ] && [ "$VERSION" == "latest" ]); then elif ([ "$IMAGE" == "CentOS" ] && [ "$VERSION" == "7" ]) || ([ "$IMAGE" == "CentOS" ] && [ "$VERSION" == "8" ]) || ([ "$IMAGE" == "Ubuntu" ] && [ "$VERSION" == "latest" ]) || ([ "$IMAGE" == "Ubuntu" ] && [ "$VERSION" == "18" ]) || ([ "$IMAGE" == "Debian" ] && [ "$VERSION" == "latest" ]) || ([ "$IMAGE" == "Fedora" ] && [ "$VERSION" == "latest" ]); then
echo -e "Version ................................ [\e[32mOK\e[0m]" echo -e "Version ................................ [\e[32mOK\e[0m]"
else else
echo -e "Version ................................ [\e[31mERROR\e[0m]" echo -e "Version ................................ [\e[31mERROR\e[0m]"
...@@ -104,8 +104,8 @@ if [ -z "$OMPI" ]; then ...@@ -104,8 +104,8 @@ if [ -z "$OMPI" ]; then
OMPI= OMPI=
echo -e "OpenMPI ................................ [\e[33mNO\e[0m]" echo -e "OpenMPI ................................ [\e[33mNO\e[0m]"
else else
OMPI="OpenMPI/3.1.4-GCC-8.3.0-2.32" OMPI="OpenMPI/4.1.2-GCC-11.2.0"
echo -e "OpenMPI 3.1.4 .......................... [\e[32mOK\e[0m]" echo -e "OpenMPI/4.1.2-GCC-11.2.0 ............... [\e[32mOK\e[0m]"
fi fi
USER=$(whoami) USER=$(whoami)
...@@ -121,9 +121,7 @@ fi ...@@ -121,9 +121,7 @@ fi
echo -e "\e[32mCreate & Build singularity image\e[0m ($IMAGE-$VERSION-$TYPE)" echo -e "\e[32mCreate & Build singularity image\e[0m ($IMAGE-$VERSION-$TYPE)"
if [ "$IMAGE" == "CentOS" ]; then if [ "$IMAGE" == "CentOS" ]; then
if [ "$VERSION" == "6" ]; then if [ "$VERSION" == "8" ]; then
BOOTSTRAP="CENTOS6LATEST"
elif [ "$VERSION" == "8" ]; then
BOOTSTRAP="CENTOS8LATEST" BOOTSTRAP="CENTOS8LATEST"
else else
BOOTSTRAP="CENTOS7LATEST" BOOTSTRAP="CENTOS7LATEST"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment