-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.TEMPLATE.yaml
50 lines (50 loc) · 1.62 KB
/
config.TEMPLATE.yaml
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
---
proxy:
secretToken: ${PROXY_SECRET}
${AUTH_SECTION}
singleuser:
image:
name: ${DOCKER_REPO}
tag: ${IMG_TAG}
pullPolicy: Always
defaultUrl: "/lab"
cloudMetadata: # For microk8s compatibility
enabled: true
storage: # For PyTorch Dataloader
extraVolumes:
- name: shm-volume
emptyDir:
medium: Memory
extraVolumeMounts:
- name: shm-volume
mountPath: /dev/shm
extraEnv:
GRANT_SUDO: "yes"
NOTEBOOK_ARGS: "--allow-root"
uid: 0
cmd: start-singleuser.sh
lifecycleHooks:
postStart: # Provision user environment on initial startup
exec:
command:
- "bash"
- "-c"
- >
if [ ! -d "${FASTAI_BOOK_ENV}" ]; then
echo "Provisioning environment; this may take a few minutes.";
echo "Enabling persistent user conda env creation." &&
conda config --add envs_dirs $ENV_DIR &&
conda config --set env_prompt '({name})';
echo "Fetching ${FASTAI_BOOK_ENV} repo." &&
git clone "https://github.com/fastai/${FASTAI_BOOK_ENV}.git" &&
echo "Configuring conda for bash." &&
conda init bash &&
echo "conda activate ${FASTAI_BOOK_ENV}" >> .bashrc &&
ln -s .bashrc .bash_profile &&
echo "Provisioning succeeded!" ||
echo "Provisioning FAILED! Please contact an administrator for
further assistance." &&
usr/bin/false;
fi;
echo "Welcome! Remember to select \"$FASTAI_BOOK_ENV\" as your
notebook kernel";