-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker_functions
31 lines (27 loc) · 1.02 KB
/
docker_functions
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
root-docker () {
docker run --rm -it --network=host \
-e USERID=$UID -e USER=$USER -e DISPLAY=$DISPLAY \
-e QT_X11_NO_MITSHM="1" \
-v $PWD:/home/user/data \
-v $HOME/.Xauthority:/home/user/.Xauthority \
-w /home/user/data \
--entrypoint "root" -v /tmp/.X11-unix:/tmp/.X11-unix:rw uofscphysics/root $*;
}
python-root () {
docker run --rm -it --network=host \
-e USERID=$UID -e USER=$USER -e DISPLAY=$DISPLAY \
-e QT_X11_NO_MITSHM="1" \
-v $PWD:/home/user/data \
-v $HOME/.Xauthority:/home/user/.Xauthority \
-w /home/user/data \
--entrypoint "python" -v /tmp/.X11-unix:/tmp/.X11-unix:rw uofscphysics/root $*;
}
jupyter-root () {
docker run --rm -it --network=host \
-e USERID=$UID -e USER=$USER -e DISPLAY=$DISPLAY \
-e QT_X11_NO_MITSHM="1" \
-v $PWD:/home/user/data \
-v $HOME/.Xauthority:/home/user/.Xauthority \
-w /home/user/data \
-v /tmp/.X11-unix:/tmp/.X11-unix:rw uofscphysics/root $*;
}