forked from CSCfi/hpc-container-wrapper
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
30 lines (27 loc) · 861 Bytes
/
install.sh
File metadata and controls
30 lines (27 loc) · 861 Bytes
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
#!/bin/bash
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
cd $SCRIPT_DIR
if [[ ! ${1+defined} ]];then
echo "Supply a default config, options: $(ls configs | tr '\n' ' ' | sed 's/.yaml//g')"
exit 1
fi
if [[ ! -f "configs/$1.yaml" ]];then
echo "Specified config does not exists, options: $(ls configs | tr '\n' ' ' | sed 's/.yaml//g')"
exit 1
fi
if [[ $( which python3 &> /dev/null ) ]];then
echo "Could not find python3"
exit 1
fi
if [[ $(which pip3 &> /dev/null ) ]];then
echo "Could not find pip3"
exit 1
fi
mkdir default_config
ln -s ../configs/$1.yaml default_config/config.yaml
echo "Using python3: $(which python3)"
unset PYTHONUSERBASE
export PYTHONUSERBASE=PyDeps
echo "export PY_EXE=$(which python3)" > frontends/inst_vars.sh
echo "Installing pyyaml"
pip3 install --user pyyaml