-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathruntime.sh
More file actions
executable file
·47 lines (41 loc) · 1.07 KB
/
runtime.sh
File metadata and controls
executable file
·47 lines (41 loc) · 1.07 KB
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
#!/bin/bash
# ---------------------------------------------------------------------------
# Build docker image and run ROS code for runtime or interactively with bash
# ---------------------------------------------------------------------------
BASH_CMD=""
# Function to print usage
usage() {
echo "
Usage: dev.sh [-b|bash] [-h|--help]
Where:
-b | bash Open bash in docker container (Default in dev.sh)
-h | --help Show this help message
"
exit 1
}
# Parse command-line options
while [[ "$#" -gt 0 ]]; do
case $1 in
-b|bash)
BASH_CMD=bash
;;
-h|--help)
usage
;;
*)
echo "Unknown option: $1"
usage
;;
esac
shift
done
# Build docker image only up to base stage
DOCKER_BUILDKIT=1 docker build \
-t av_imu:latest \
-f Dockerfile --target runtime .
# Run docker image without volumes
docker run -it --rm --net host --privileged \
-v /dev:/dev \
-v /tmp:/tmp \
-v /etc/localtime:/etc/localtime:ro \
av_imu:latest $CMD