-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
executable file
·28 lines (21 loc) · 848 Bytes
/
run.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
#!/bin/bash -eu
# Check if the user belongs to "docker" group
groups | grep -q docker && SUDO="" || SUDO="sudo"
DOCKER=ghcr.io/tiryoh/conda-jupyter-ros:noetic
JUPYTER_TOKEN=$(sed -e "s/://g" /sys/class/net/wlan0/address)
echo "========================================="
echo JupyterLab Token: $JUPYTER_TOKEN
echo "========================================="
set -x
# --privileged \
# --device /dev/video0 \
# --group-add video \
# -v /dev/bus/usb:/dev/bus/usb --device-cgroup-rule='c 189:* rmw' \
# -p 8888:8888 \
# ${DOCKER} \
# jupyter lab --notebook-dir=/workspace --ip 0.0.0.0 --no-browser
$SUDO docker run --rm -it -u $(id -u):$(id -g) \
-v $(pwd)/notebook:/workspace \
--network=host \
${DOCKER} \
bash -c "/jupyter_entrypoint.sh --ServerApp.token=${JUPYTER_TOKEN}"