Commit 38195647 authored by easybuild's avatar easybuild

new repository

parent fb30dbed
This diff is collapsed.
......@@ -41,11 +41,35 @@ cd /
mkdir /apps
mkdir /scratch
rm /tmp/get-pip.py /tmp/rpm/ /tmp/rpm.tar.gz /tmp/openmpi-2.1.0.tar.gz -rf
# 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
%environment
. /apps/all/Lmod/7.7.7/lmod/lmod/init/profile
ml purge --force
source /opt/apps/lmod/7.7.7/init/profile
clearMT
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export -f ml
export -f module
export -f clearMT
This diff is collapsed.
This diff is collapsed.
......@@ -4,8 +4,6 @@ IncludeCmd: yes
%setup
cp /apps/easybuild/sources/n/NVIDIA/NVIDIA-Linux-x86_64-390.30.run /tmp
cp /apps/easybuild/sources/c/CUDA/cuda_9.1.85_linux-run /tmp
cp /apps/easybuild/sources/c/cuDNN/cudnn-9.1-linux-x64-v7.1.tgz /tmp
%post
yum -y update && yum -y upgrade
......@@ -16,10 +14,10 @@ yum -y groupinstall "Development Tools"
cd /tmp
# OpenMPI
wget https://www.open-mpi.org/software/ompi/v2.1/downloads/openmpi-2.1.0.tar.gz
tar xvf openmpi-2.1.0.tar.gz && cd openmpi-2.1.0
wget https://www.open-mpi.org/software/ompi/v2.1/downloads/openmpi-2.1.1.tar.gz
tar xvf openmpi-2.1.1.tar.gz && cd openmpi-2.1.1
./configure --prefix=/usr/local
make -j 14
make -j 16
make install
# pip
......@@ -28,14 +26,34 @@ python get-pip.py
pip install setuptools --upgrade
cd /
mkdir /apps
mkdir /scratch
# 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
# GPU
driver_version=390.30
driver="/tmp/NVIDIA-Linux-x86_64-$driver_version.run"
cuda="/tmp/cuda_9.1.85_linux-run"
cudnn="/tmp/cudnn-9.1-linux-x64-v7.1.tgz"
sh $driver -x
mv NVIDIA-Linux-x86_64-$driver_version /usr/local/
......@@ -70,23 +88,13 @@ ln -s libvdpau.so.$driver_version libvdpau.so
ln -s libvdpau_trace.so.$driver_version libvdpau_trace.so
ln -s libcuda.so.$driver_version libcuda.so.1
sh $cuda --toolkit --silent
tar xvf $cudnn -C /usr/local
driver_path=/usr/local/NVIDIA-Linux-x86_64-$driver_version
cd /tmp
rm cudnn-9.1-linux-x64-v7.1.tgz
rm NVIDIA-Linux-x86_64-390.30.run
rm openmpi-2.1.0.tar.gz
rm cuda_9.1.85_linux-run
# APPS and SCRATCH
mkdir /apps
mkdir /scratch
%environment
. /apps/all/Lmod/7.7.7/lmod/lmod/init/profile
ml purge --force
source /opt/apps/lmod/7.7.7/init/profile
clearMT
export -f ml
export -f module
export -f clearMT
......
......@@ -41,11 +41,35 @@ cd /
mkdir /apps
mkdir /scratch
rm /tmp/get-pip.py /tmp/rpm/ /tmp/rpm.tar.gz /tmp/openmpi-2.1.0.tar.gz -rf
# 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
%environment
. /apps/all/Lmod/7.7.7/lmod/lmod/init/profile
ml purge --force
source /opt/apps/lmod/7.7.7/init/profile
clearMT
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export -f ml
export -f module
export -f clearMT
GPU_DRIVER_VERSION=390.30
GPU_DRIVER_PATH=/apps/easybuild/sources/n/NVIDIA/NVIDIA-Linux-x86_64-390.30.run
CUDA_VERSION=9.1.85
CUDA_PATH=/apps/easybuild/sources/c/CUDA/cuda_9.1.85_linux-run
MPSS_PATH=/opt/mpss
MIC_PATH=./rpm.tar.gz
SINGULARITY_BIN_PATH=/apps/all/Singularity/2.4.2/bin
SINGULARITY_BIN_PATH=/apps/all/Singularity/2.4.4/bin
IMAGE_PATH=/apps/all/OS
MODULEFILE_PATH=/apps/modules
USER_IMAGE=easybuild
LMOD_VERSION=7.7.7
export EBROOTSQUASHFSMINTOOLS=/apps/all/squashfs-tools/4.3
......@@ -9,8 +9,8 @@ if [[ $# -eq 0 ]]; then
printf "\e[31m
./install.sh\e[0m ... create and build singularity image
-\e[33mi\e[0m OS (\e[33mCentOS\e[0m, \e[33mFedora\e[0m, \e[33mDebian\e[0m, \e[33mUbuntu\e[0m)
-\e[33mv\e[0m Version OS (CentOS \e[33m6.9\e[0m or CentOS \e[33m7.3\e[0m, Fedora \e[33m26\e[0m, Debian \e[33m8.0\e[0m, Ubuntu \e[33m16.04\e[0m)
-\e[33mo\e[0m OpenMPI module (default is \e[31mOpenMPI/2.1.0-GCC-6.3.0-2.27\e[0m)
-\e[33mv\e[0m Version OS (CentOS \e[33m6.9\e[0m or CentOS \e[33m7.4\e[0m, Fedora \e[33m26\e[0m, Debian \e[33m8.0\e[0m, Ubuntu \e[33m16.04\e[0m)
-\e[33mo\e[0m OpenMPI module (default is \e[31mOpenMPI/2.1.1-GCC-6.3.0-2.27\e[0m)
-\e[33mt\e[0m \e[33mclassic\e[0m, \e[33mGPU\e[0m, \e[33mMIC\e[0m (default is \e[31mclassic\e[0m)
Example:
\e[33m ./install.sh -i CentOS -v 6.9\e[0m
......@@ -48,14 +48,14 @@ printf "\033c"
TEST_CONFIG="TRUE"
# test empty value
if [ -z "$SINGULARITY_BIN_PATH" ] || [ -z "$IMAGE_PATH" ] || [ -z "$MODULEFILE_PATH" ] || [ -z "$USER_IMAGE" ] || [ -z "$LMOD_VERSION" ] || [ -z "$LMOD_PATH" ]; then
if [ -z "$SINGULARITY_BIN_PATH" ] || [ -z "$IMAGE_PATH" ] || [ -z "$MODULEFILE_PATH" ] || [ -z "$USER_IMAGE" ]; then
TEST_CONFIG="FALSE"
echo "CONFIG test empty value ERROR"
fi
# GPU and MIC test value
if [ "$TYPE" == "GPU" ]; then
if [ -z "$GPU_DRIVER_VERSION" ] || [ -z "$GPU_DRIVER_PATH" ] || [ -z "$CUDA_VERSION" ] || [ -z "$CUDA_PATH" ]; then
if [ -z "$GPU_DRIVER_VERSION" ] || [ -z "$GPU_DRIVER_PATH" ]; then
TEST_CONFIG="FALSE"
echo "CONFIG test empty value for GPU ERROR"
fi
......@@ -65,11 +65,6 @@ if [ "$TYPE" == "GPU" ]; then
echo "CONFIG test GPU DRIVER PATH ERROR"
fi
if [ ! -f "$CUDA_PATH" ]; then
TEST_CONFIG="FALSE"
echo "CONFIG test CUDA PATH ERROR"
fi
GPU=$(lspci | grep NVIDIA)
if [ -z "$GPU" ]; then
......@@ -132,16 +127,6 @@ if [ -z "$USER_IMAGE" ]; then
echo "CONFIG test USER IMAGE ERROR"
fi
if [ -z "$LMOD_VERSION" ]; then
TEST_CONFIG="FALSE"
echo "CONFIG test LMOD VERSION ERROR"
fi
if [ ! -d "$LMOD_PATH" ]; then
TEST_CONFIG="FALSE"
echo "CONFIG test LMOD PATH ERROR"
fi
echo -n "Check CONFIG ........................... ["
if [ "$TEST_CONFIG" == "TRUE" ]; then
echo -e "\e[32mOK\e[0m]"
......@@ -184,7 +169,7 @@ else
fi
if [ -z "$OMPI" ]; then
OMPI="OpenMPI/2.1.0-GCC-6.3.0-2.27"
OMPI="OpenMPI/2.1.1-GCC-6.3.0-2.27"
echo -e "OpenMPI set to default ................. [\e[32mOK\e[0m]"
else
echo -e "OpenMPI ................................ [\e[32mOK\e[0m]"
......@@ -290,9 +275,7 @@ if [ -f "image.img" ]; then
cd ./modulefile_template
echo -n "Modulefile for image ............................................................................................. ["
./create_modulefile.sh "$IMAGE" "$VERSION" "$OMPI" "$T_1" || (echo -e "\e[31mFALSE\e[0m]" && exit 1) && echo -e "\e[32mOK\e[0m]"
echo -n "Modulefile for image-shell ....................................................................................... ["
./create_modulefile.sh "$IMAGE" "$VERSION" "$OMPI" "$T_2" || (echo -e "\e[31mFALSE\e[0m]" && exit 1) && echo -e "\e[32mOK\e[0m]"
echo -e "\e[32mSuccess\e[0m (module \e[33m$IMAGE/$VERSION$TYPE\e[0m and \e[33m$IMAGE/$VERSION$TYPE-shell\e[0m)"
echo -e "\e[32mSuccess\e[0m (module \e[33m$IMAGE/$VERSION$TYPE\e[0m)"
exit 0
else
echo -e "\e[31mFail (image.img not exists...)\e[0m]"
......
......@@ -47,11 +47,9 @@ fi
echo "conflict(\"Singularity\")" >> "$NAME"
echo "" >> "$NAME"
if [ $SHELL == "FALSE" ]; then
echo "if not isloaded(\"OpenMPI/2.1.0-GCC-6.3.0-2.27\") then" >> "$NAME"
echo " load(\"OpenMPI/2.1.0-GCC-6.3.0-2.27\")" >> "$NAME"
echo "end" >> "$NAME"
fi
echo "if not isloaded(\"OpenMPI/2.1.1-GCC-6.3.0-2.27\") then" >> "$NAME"
echo " load(\"OpenMPI/2.1.1-GCC-6.3.0-2.27\")" >> "$NAME"
echo "end" >> "$NAME"
echo "" >> "$NAME"
echo "if not isloaded(\"Singularity\") then" >> "$NAME"
echo " load(\"Singularity\")" >> "$NAME"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment