-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrunLAppSEnv.sh
executable file
·53 lines (36 loc) · 1.14 KB
/
runLAppSEnv.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
if [ -f ./common.sh ]
then
source ./common.sh
export MANDATORY="CPREFIX UBUNTU BUILD"
export SOFT="MAP"
chk_args "$@"
export UBUNTU_VERSION_CHOSEN=0
for i in bionic focal
do
if [ "${UBUNTU}" == "${i}" ]
then
export UBUNTU_VERSION_CHOSEN=1
fi
done
export BUILD_TYPE_CHOSEN=0
for i in avx2 avx ssse3 sse2
do
if [ "${BUILD}" == "${i}" ]
then
export BUILD_TYPE_CHOSEN=1
fi
done
[ ${UBUNTU_VERSION_CHOSEN} ] || die "Use --ubuntu {focal|bionic} - only these two ubuntu versions are supported"
[ ${BUILD_TYPE_CHOSEN} ] || die "Use --build {avx2|avx|ssse3|sse2} - only these two build types are supported"
[ -f ./VERSION ] || die "No VERSION file in current directory"
export VERSION=$(cat ./VERSION)
export options=""
for i in $MAP
do
export options="${options} -v ${i}"
done
docker run -it --rm --name ${CPREFIX}.${VERSION}.${UBUNTU}.${BUILD} -h lapps --network=host $options lapps:runenv.${VERSION}.${UBUNTU}.${BUILD} bash
else
echo "This file is supposed to be executed from within the LAppS build directory (clone of https://github.com/ITpC/LAppS.git)"
fi