-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_once_after_install-spack-packages-cluster.sh.tmpl
65 lines (50 loc) · 1.62 KB
/
run_once_after_install-spack-packages-cluster.sh.tmpl
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{{- if (and (eq .chezmoi.os "linux") (.spack_packages)) -}}
#!/usr/bin/env bash
cmd() {
echo "+ $@"
eval "$@"
}
echo "Setting up packages with spack"
cmd "cd ${HOME}"
if [ ! -d "${HOME}/spack" ]; then
cmd "git clone -c feature.manyFiles=true https://github.com/spack/spack.git"
fi
cmd "export SPACK_DIR=${HOME}/spack"
cmd "source ${SPACK_DIR}/share/spack/setup-env.sh"
ENV_NAME="prog-utils"
ENV_DIR="${SPACK_DIR}/var/spack/environments/${ENV_NAME}"
cmd "spack env activate --create ${ENV_NAME}"
cmd "spack add [email protected]+tls+native+treesitter+json%gcc"
# cmd "spack add [email protected]+tls+json%gcc"
# cmd "spack add ccls%gcc"
cmd "spack concretize -f"
cmd "spack env deactivate"
# MODULE_DIR="${HOME}/modules"
# cmd "mkdir -p ${MODULE_DIR}"
# cmd "quick-create -n ${ENV_NAME}"
# cmd "quick-activate ${ENV_DIR}"
# if [ ! -z $(grep -L "modules:" "${ENV_DIR}/spack.yaml") ]; then
# echo "Adding modules to spack.yaml"
# echo " modules:
# default:
# roots:
# tcl: ${MODULE_DIR}
# tcl:
# projections:
# all: '{compiler.name}-{compiler.version}/{name}/{version}/{hash:4}'
# hash_length: 0
# all:
# conflict:
# - '{name}'
# environment:
# set:
# '{name}_ROOT_DIR': '{prefix}'
# include: [emacs, ccls]
# exclude: ['%gcc']" >> "${ENV_DIR}/spack.yaml"
# fi
# cmd "spack concretize -f"
# cmd "spack install"
# cmd "spack module tcl refresh -y"
# cmd "touch ${MODULE_DIR}/linux-centos7-skylake_avx512/gcc-9.3.0/ccls/.version"
# cmd "rm -rf ~/.lmod.d/.cache"
{{ end -}}