-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docker setup for automated testing (#42)
- Loading branch information
1 parent
3f71018
commit 307eb63
Showing
10 changed files
with
200 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
services: | ||
main: | ||
build: . | ||
volumes: | ||
- ./rb_ws:/rb_ws | ||
- "${RLSENSE_PORT:-/dev/null}:/dev/bus/usb" | ||
- /tmp/.X11-unix:/tmp/.X11-unix | ||
devices: | ||
- "${TEENSY_PORT:-/dev/null}:/dev/ttyUSB0" | ||
- "${WEBCAM_PORT:-/dev/null}:/dev/ttyUSB1" | ||
- "${GPS_PORT:-/dev/null}:/dev/ttyACM0" | ||
- "${FEATHER_PORT:-/dev/null}:/dev/ttyACM1" | ||
stdin_open: true # docker run -i | ||
tty: true # docker run -t | ||
environment: | ||
- DISPLAY=host.docker.internal:0 | ||
hostname: main | ||
ports: | ||
- "0.0.0.0:8765:8765" # foxglove bridge | ||
- "0.0.0.0:8760:8760" # Asset server for loading stuff into foxglove | ||
platform: "linux/amd64" | ||
device_cgroup_rules: | ||
- "c *:* rmw" | ||
deploy: | ||
resources: | ||
reservations: | ||
devices: | ||
- driver: nvidia | ||
count: 'all' | ||
capabilities: [gpu] | ||
tileserver: | ||
image: maptiler/tileserver-gl | ||
volumes: | ||
- "./maps:/data" | ||
stdin_open: true # docker run -i | ||
tty: true # docker run -t | ||
command: ["-p", "80", "-c", "/data/conf.json"] | ||
ports: | ||
- "8080:80" | ||
tester: | ||
build: . | ||
volumes: | ||
- ./rb_ws:/rb_ws | ||
- /tmp/.X11-unix:/tmp/.X11-unix | ||
stdin_open: true # docker run -i | ||
tty: true # docker run -t | ||
environment: | ||
- DISPLAY=host.docker.internal:0 | ||
hostname: tester | ||
platform: "linux/amd64" | ||
device_cgroup_rules: | ||
- "c *:* rmw" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
services: | ||
main: | ||
build: ./docker_auton | ||
volumes: | ||
- ./rb_ws:/rb_ws | ||
- "${RLSENSE_PORT:-/dev/null}:/dev/bus/usb" | ||
- /tmp/.X11-unix:/tmp/.X11-unix | ||
devices: | ||
- "${TEENSY_PORT:-/dev/null}:/dev/ttyUSB0" | ||
- "${WEBCAM_PORT:-/dev/null}:/dev/ttyUSB1" | ||
- "${GPS_PORT:-/dev/null}:/dev/ttyACM0" | ||
- "${FEATHER_PORT:-/dev/null}:/dev/ttyACM1" | ||
stdin_open: true # docker run -i | ||
tty: true # docker run -t | ||
environment: | ||
- DISPLAY=host.docker.internal:0 | ||
hostname: main | ||
ports: | ||
- "0.0.0.0:8765:8765" # foxglove bridge | ||
- "0.0.0.0:8760:8760" # Asset server for loading stuff into foxglove | ||
platform: "linux/amd64" | ||
device_cgroup_rules: | ||
- "c *:* rmw" | ||
tileserver: | ||
image: maptiler/tileserver-gl | ||
volumes: | ||
- "./maps:/data" | ||
stdin_open: true # docker run -i | ||
tty: true # docker run -t | ||
command: ["-p", "80", "-c", "/data/conf.json"] | ||
ports: | ||
- "8080:80" | ||
tester: | ||
build: ./docker_tester | ||
volumes: | ||
- ./rb_ws:/rb_ws | ||
- /tmp/.X11-unix:/tmp/.X11-unix | ||
stdin_open: true # docker run -i | ||
tty: true # docker run -t | ||
environment: | ||
- DISPLAY=host.docker.internal:0 | ||
hostname: tester | ||
platform: "linux/amd64" | ||
device_cgroup_rules: | ||
- "c *:* rmw" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
FROM nvidia/cuda:11.6.2-base-ubuntu20.04 as CUDA | ||
|
||
FROM osrf/ros:noetic-desktop-full-focal | ||
|
||
COPY --from=CUDA /usr/local/cuda /usr/local/ | ||
|
||
|
||
RUN apt update | ||
RUN apt-get install -y -qq \ | ||
python3-pip \ | ||
python3-tk \ | ||
vim git tmux tree sl htop x11-apps | ||
|
||
RUN apt-get install -y -qq \ | ||
ros-noetic-rosserial \ | ||
ros-noetic-foxglove-bridge \ | ||
ros-noetic-microstrain-inertial-driver \ | ||
ros-noetic-realsense2-camera \ | ||
ros-noetic-realsense2-description \ | ||
iputils-ping | ||
|
||
COPY python-requirements_TEMP_DO_NOT_EDIT.txt python-requirements.txt | ||
RUN pip3 install -r python-requirements.txt | ||
|
||
RUN echo 'source "/opt/ros/$ROS_DISTRO/setup.bash" --' >> ~/.bashrc | ||
RUN echo 'cd rb_ws' >> ~/.bashrc | ||
RUN echo 'catkin_make >/dev/null' >> ~/.bashrc | ||
RUN echo 'source devel/setup.bash' >> ~/.bashrc | ||
RUN echo 'export ROS_MASTER_URI=http://main:11311' >> ~/.bashrc | ||
|
||
# shoestring fix since installing numba from pythonrequirements | ||
# smh breaks | ||
RUN pip3 install numba | ||
|
||
# add mouse to tmux | ||
RUN echo 'set -g mouse on' >> ~/.tmux.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters