-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.bash
38 lines (32 loc) · 887 Bytes
/
run.bash
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
#!/bin/bash
IMAGE_NAME=pronto_estimator_framework
IMAGE_TAG=1.5
chmod +rw ~/.bash_history
chmod o+w ~/.bash_history
WORKSPACE=docker_pronto_ws
# Create /tmp/.docker.xauth if it does not already exist.
XAUTH=/tmp/.docker.xauth
if [ ! -f $XAUTH ]
then
touch $XAUTH
xauth nlist $DISPLAY | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge -
fi
xhost +
docker run \
--net=host \
-it \
-v $(pwd):/home/ros/$WORKSPACE \
--env="HISTFILE=/home/ros/.bash_history" \
--env="HISTFILESIZE=2000" \
-v ~/.bash_history:/home/ros/.bash_history \
--device=/dev/dri:/dev/dri \
--privileged -v /dev/input:/dev/input \
--rm \
--env="DISPLAY=$DISPLAY" \
-v /tmp/.X11-unix:/tmp/.X11-unix \
--env="XAUTHORITY=$XAUTH" \
--volume="$XAUTH:$XAUTH" \
--name docker_pronto \
-w /home/ros/$WORKSPACE \
$IMAGE_NAME:$IMAGE_TAG \
/bin/bash