-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcontainer_setup_for_HSP.sh
More file actions
executable file
·40 lines (32 loc) · 1.19 KB
/
container_setup_for_HSP.sh
File metadata and controls
executable file
·40 lines (32 loc) · 1.19 KB
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
#!/bin/bash
#===============================
# Steps for configuring Singularity
# and Docker for rootless access on
# HSP
#
# Usage:
#
#
#
#===============================
#===============================
# Singularity
#===============================
# Here, using $HOME, but you could use other writable paths.
# The default is /tmp but that is not always writeable.
export SINGULARITY_TMPDIR=${HOME}/.singularity_tmp
export SINGULARITY_CACHEDIR=${HOME}/.singularity_cache
# singularity pull will fail if these directories do not already exist
# Singularity does automatically make the necessary subdirs.
mkdir -p $SINGULARITY_TMPDIR
mkdir -p $SINGULARITY_CACHEDIR
# TODO - Optionally add this config to .bashrc with --modify_bashrc flag
# for repeating steps on all shells started on a cluster.
echo "export SINGULARITY_TMPDIR=${HOME}/.singularity_tmp" >> ~/.bashrc
echo "export SINGULARITY_CACHEDIR=${HOME}/.singularity_cache" >> ~/.bashrc
#================================
# Docker
#================================
dockerd-rootless-setuptool.sh install
PATH=/usr/bin:/sbin:/usr/sbin:$PATH dockerd-rootless.sh --exec-opt native.cgroupdriver=cgroupfs &
# TODO - Are there any configs to add to .bashrc?