-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·30 lines (24 loc) · 1.08 KB
/
setup.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
#!/bin/bash
# Copyright (c) 2023 Graphcore Ltd. All rights reserved.
# Script to be sourced on launch of the Gradient Notebook
DETECTED_NUMBER_OF_IPUS=$(python .gradient/available_ipus.py)
if [[ "$1" == "test" ]]; then
IPU_ARG="${DETECTED_NUMBER_OF_IPUS}"
else
IPU_ARG=${1:-"${DETECTED_NUMBER_OF_IPUS}"}
fi
export NUM_AVAILABLE_IPU=${IPU_ARG}
export GRAPHCORE_POD_TYPE="pod${IPU_ARG}"
export POPLAR_EXECUTABLE_CACHE_DIR="/tmp/exe_cache"
export DATASET_DIR="/tmp/dataset_cache"
export CHECKPOINT_DIR="/tmp/checkpoints"
# mounted public dataset directory (path in the container)
# in the Paperspace environment this would be ="/datasets"
export PUBLIC_DATASET_DIR="/datasets"
export POPTORCH_CACHE_DIR="${POPLAR_EXECUTABLE_CACHE_DIR}"
export POPTORCH_LOG_LEVEL=ERR
export RDMAV_FORK_SAFE=1
export PIP_DISABLE_PIP_VERSION_CHECK=1 CACHE_DIR=/tmp
jupyter lab --allow-root --ip=0.0.0.0 --no-browser --ServerApp.trust_xheaders=True \
--ServerApp.disable_check_xsrf=False --ServerApp.allow_remote_access=True \
--ServerApp.allow_origin='*' --ServerApp.allow_credentials=True