Commit da3e74fd authored by Lukáš Krupčík's avatar Lukáš Krupčík

new file: CentOS/7.5/CentOS-7.5-Bootstrap

	modified:   Ubuntu/16.04-OpenFOAM/Ubuntu-16.04-Bootstrap
	new file:   Ubuntu/16.04-OpenFOAM/openfoam6-linux
	modified:   install/CENTOS7
	modified:   install/CONFIG
	modified:   install/modulefile_template/create_modulefile.sh
parent 12fe2ffd
This diff is collapsed.
......@@ -67,14 +67,14 @@ apt install -y software-properties-common wget
add-apt-repository "http://dl.openfoam.org/ubuntu"
sh -c "wget -O - http://dl.openfoam.org/gpg.key | apt-key add -"
apt update
apt install -y openfoam5
echo '. /opt/openfoam5/etc/bashrc' >>$SINGULARITY_ENVIRONMENT
apt install -y openfoam6
echo '. /opt/openfoam6/etc/bashrc' >>$SINGULARITY_ENVIRONMENT
### openfoam hacks ###
mv -f /opt/bashrc /opt/openfoam5/etc
mv -f /opt/aliases /opt/openfoam5/etc/config.sh
mv -f /opt/exec /.singularity.d/actions
#mv -f /opt/bashrc /opt/openfoam6/etc
#mv -f /opt/aliases /opt/openfoam6/etc/config.sh
#mv -f /opt/exec /.singularity.d/actions
%environment
source /opt/apps/lmod/7.7.7/init/profile
......
#!/bin/sh
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2017 OpenFOAM Foundation
# \\/ M anipulation |
#-------------------------------------------------------------------------------
# License
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
#
# Script
# openfoam6-linux
#
# Description
# Run script for an OpenFOAM 6 Docker image at:
# https://hub.docker.com/r/openfoam
#
#------------------------------------------------------------------------------
Script=${0##*/}
VER=6
usage () {
exec 1>&2
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
cat <<USAGE
Usage: ${0##*/} [OPTIONS]
options:
-d | -dir host directory mounted (defaults to current directory)
-x | -xhost use custom X authority and give container host network
-h | -help help
Launches the OpenFOAM ${VER} Docker image.
- Requires installation of docker-engine.
- Runs a "containerized" bash shell environment where the user can run OpenFOAM
and, optionally, ParaView (see below).
- The container mounts the user's file system so that case files are stored
permanently. The container mounts the current directory by default, but the
user can also specify a particular directory using the "-d" option.
- Mounting the user's HOME directory is disallowed.
- The '-xhost' option is useful when accessing the host via 'ssh -X'.
This option should only be used when strictly necessary, as it relies on the
option '--net=host' when launching the container in Docker, which will
give to the container full access to the Docker host network stack and
potentially the host's system services that rely on network communication,
making it potentially insecure.
Example:
To store data in ${HOME}/OpenFOAM/${USER}-${VER}, the user can launch
${Script} either by:
cd ${HOME}/OpenFOAM/${USER}-${VER} && ${Script}
or
${Script} -d ${HOME}/OpenFOAM/${USER}-${VER}
Further Information:
http://openfoam.org/download/6-linux
Note:
The container user name appears as "openfoam" but it is just an alias.
USAGE
exit 1
}
DOCKER_IMAGE='openfoam/openfoam6-paraview54'
MOUNT_DIR=$(pwd)
CUSTOM_XAUTH=""
DOCKER_OPTIONS=""
while [ "$#" -gt 0 ]
do
case "$1" in
-d | -dir)
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
MOUNT_DIR=$2
shift 2
;;
-x | -xhost)
CUSTOM_XAUTH=yes
shift
;;
-h | -help)
usage
;;
*)
usage "Invalid option '$1'"
;;
esac
done
[ -d "$MOUNT_DIR" ] || usage "No directory exists: $MOUNT_DIR"
MOUNT_DIR=$(cd "$MOUNT_DIR" && pwd -P)
[ "$MOUNT_DIR" = "$(cd "$HOME" && pwd -P)" ] && \
usage "Mount directory cannot be the user's home directory" \
"Make a subdirectory and run from there, e.g." \
" mkdir -p ${HOME}/OpenFOAM/$(whoami)-${VER}" \
" ${Script} -d ${HOME}/OpenFOAM/$(whoami)-${VER}"
if [ -n "$CUSTOM_XAUTH" ]
then
XAUTH_PATH="${MOUNT_DIR}/.docker.xauth.$$"
touch "${XAUTH_PATH}"
# Generate a custom X-authority file that allows any hostname
xauth nlist "$DISPLAY" | sed -e 's/^..../ffff/' | \
xauth -f "$XAUTH_PATH" nmerge -
DOCKER_OPTIONS="-e XAUTHORITY=$XAUTH_PATH
-v $XAUTH_PATH:$XAUTH_PATH
--net=host"
fi
USER_ID=$(id -u 2> /dev/null)
[ -n "$USER_ID" ] || usage "Cannot determine current user ID"
GROUP_ID=$(id -g)
HOME_DIR='/home/openfoam'
echo "Launching $0"
echo "User: \"$(id -un)\" (ID $USER_ID, group ID $GROUP_ID)"
docker run -it \
--rm \
-e DISPLAY=$DISPLAY \
-u $USER_ID:$GROUP_ID \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v $MOUNT_DIR:$HOME_DIR \
$DOCKER_OPTIONS \
$DOCKER_IMAGE
[ -n "$CUSTOM_XAUTH" -a -e "${XAUTH_PATH}" ] && rm "${XAUTH_PATH}"
......@@ -25,7 +25,7 @@ make install
curl -s -O https://bootstrap.pypa.io/get-pip.py
python get-pip.py
pip install setuptools python-graph-core python-graph-dot tabulate numpy scipy pandas wheel --upgrade
pip install setuptools numpy scipy pandas wheel --upgrade
# lua
wget http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/lua-posix-32-2.el7.x86_64.rpm
......
......@@ -2,7 +2,7 @@ GPU_DRIVER_VERSION=390.30
GPU_DRIVER_PATH=/apps/easybuild/sources/n/NVIDIA/NVIDIA-Linux-x86_64-390.30.run
MPSS_PATH=/opt/mpss
MIC_PATH=./rpm.tar.gz
SINGULARITY_BIN_PATH=/apps/all/Singularity/2.4.4/bin
SINGULARITY_BIN_PATH=/apps/all/Singularity/2.5.1/bin
IMAGE_PATH=/apps/all/OS
MODULEFILE_PATH=/apps/modules
USER_IMAGE=easybuild
......
......@@ -26,8 +26,8 @@ fi
if [ "$IMAGE" == "CentOS" ]; then
if [ "$VERSION" == "6.9" ]; then
PATH="./centos/6.9"
elif [ "$VERSION" == "7.4" ]; then
PATH="./centos/7.4"
elif [ "$VERSION" == "7.5" ]; then
PATH="./centos/7.5"
else
echo "Unsupported OS Version"
exit 1
......
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