From e6e2ae6d6168a5c4c86a3379fc427ccacf24fd76 Mon Sep 17 00:00:00 2001 From: Marc Hanheide Date: Wed, 12 Feb 2025 15:20:28 +0000 Subject: [PATCH 1/9] install coder --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 38832ae..5da5645 100644 --- a/Dockerfile +++ b/Dockerfile @@ -129,6 +129,8 @@ RUN . /opt/ros/lcas/install/setup.sh && \ RUN cd /opt/ros/lcas && colcon build && \ rm -rf /opt/ros/lcas/src/ /opt/ros/lcas/build/ /opt/ros/lcas/log/ +RUN curl -L https://coder.com/install.sh | sh + USER ros WORKDIR /home/ros ENV SHELL=/bin/bash From 3c2490166d9706983e797814caad8c5bfe880ac2 Mon Sep 17 00:00:00 2001 From: Marc Hanheide Date: Thu, 13 Feb 2025 00:00:26 +0100 Subject: [PATCH 2/9] corrected installation --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5da5645..a312856 100644 --- a/Dockerfile +++ b/Dockerfile @@ -129,7 +129,7 @@ RUN . /opt/ros/lcas/install/setup.sh && \ RUN cd /opt/ros/lcas && colcon build && \ rm -rf /opt/ros/lcas/src/ /opt/ros/lcas/build/ /opt/ros/lcas/log/ -RUN curl -L https://coder.com/install.sh | sh +RUN curl -fsSL https://code-server.dev/install.sh | sh USER ros WORKDIR /home/ros From d7b9b5db92b3a177a38161aa7444f12548317704 Mon Sep 17 00:00:00 2001 From: Marc Hanheide Date: Thu, 13 Feb 2025 00:27:11 +0100 Subject: [PATCH 3/9] added code server startup --- configs/docker-compose.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/configs/docker-compose.yaml b/configs/docker-compose.yaml index 7fe5818..8962203 100644 --- a/configs/docker-compose.yaml +++ b/configs/docker-compose.yaml @@ -44,8 +44,11 @@ services: # expose desktop access ports: + # port for novnc - 5801:5801 - 5901:5901 + # port for code-serer + - 9999:9999 # NOTE: We expect the environment varibable ROBOT_NAME to be set, e.g. in `.env` hostname: "${ROBOT_NAME}" @@ -54,7 +57,7 @@ services: ipc: host #command: bash -c "while true; do sleep 10; done" #command: bash -c "zenoh-bridge-ros2dds -r 8080 -l tcp/0.0.0.0:8888" - command: bash -c "source /opt/ros/lcas/install/setup.bash; echo $$CYCLONEDDS_URI; (ros2 launch astra_camera dabai.launch.py &); ros2 launch limo_bringup limo_start.launch.py" + command: bash -c "source /opt/ros/lcas/install/setup.bash; echo $$CYCLONEDDS_URI; (code-server --auth none -an coltrane --bind-addr 0.0.0.0:9999 &);(ros2 launch astra_camera dabai.launch.py &); ros2 launch limo_bringup limo_start.launch.py" volumes: - /dev:/dev - ${HOME}:/home/ros/robot_home @@ -129,4 +132,4 @@ networks: config: - subnet: 172.100.0.0/16 driver_opts: - com.docker.network.container_iface_prefix: eth \ No newline at end of file + com.docker.network.container_iface_prefix: eth From 0c6746e76db2578be5cc78a00f9363633158bb48 Mon Sep 17 00:00:00 2001 From: Marc Hanheide Date: Thu, 13 Feb 2025 08:45:04 +0000 Subject: [PATCH 4/9] add docker-compose configuration for development environment --- configs/docker-compose-dev.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 configs/docker-compose-dev.yaml diff --git a/configs/docker-compose-dev.yaml b/configs/docker-compose-dev.yaml new file mode 100644 index 0000000..444522e --- /dev/null +++ b/configs/docker-compose-dev.yaml @@ -0,0 +1,26 @@ +name: limo_platform +services: + filebrowser: + restart: no + ports: + - 8080 + + zenoh_router: + restart: no + ports: + - 7447 + - 8000 + + limo_drivers: + image: lcas.lincoln.ac.uk/lcas/limo_platform:staging + ports: + - 5801 + - 5901 + - 9999 + + hostname: testlimo + privileged: false + command: bash -c "source /opt/ros/lcas/install/setup.bash; echo $$CYCLONEDDS_URI; code-server --auth none -an coltrane --bind-addr 0.0.0.0:9999" + volumes: + runtime: + restart: no From da50483566fd62974b7732174d469608a8dba110 Mon Sep 17 00:00:00 2001 From: Marc Hanheide Date: Thu, 13 Feb 2025 09:19:38 +0000 Subject: [PATCH 5/9] update docker-compose configurations for limo_drivers with build context and caching --- configs/docker-compose-dev.yaml | 11 +++++++++++ configs/docker-compose.yaml | 1 - 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/configs/docker-compose-dev.yaml b/configs/docker-compose-dev.yaml index 444522e..cc69644 100644 --- a/configs/docker-compose-dev.yaml +++ b/configs/docker-compose-dev.yaml @@ -13,6 +13,17 @@ services: limo_drivers: image: lcas.lincoln.ac.uk/lcas/limo_platform:staging + build: + context: .. + cache_from: + - lcas.lincoln.ac.uk/lcas/ros-docker-images:westonrobot-humble-2 + - lcas.lincoln.ac.uk/cache/lcas/limo_platform:latest + - lcas.lincoln.ac.uk/lcas/limo_platform:staging + - lcas.lincoln.ac.uk/lcas/limo_platform:2 + + args: + - BASE_IMAGE=lcas.lincoln.ac.uk/lcas/ros-docker-images:westonrobot-humble-2 + ports: - 5801 - 5901 diff --git a/configs/docker-compose.yaml b/configs/docker-compose.yaml index 8962203..cfb6dba 100644 --- a/configs/docker-compose.yaml +++ b/configs/docker-compose.yaml @@ -38,7 +38,6 @@ services: limo_drivers: image: lcas.lincoln.ac.uk/lcas/limo_platform:2 - #lcas.lincoln.ac.uk/lcas/limo_platform:staging user: "ros" From e340a43a9a76af63e6cb2a48bf126f337431c9b3 Mon Sep 17 00:00:00 2001 From: Marc Hanheide Date: Fri, 14 Feb 2025 16:22:23 +0000 Subject: [PATCH 6/9] change name --- configs/docker-compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/docker-compose.yaml b/configs/docker-compose.yaml index cfb6dba..98cbd7c 100644 --- a/configs/docker-compose.yaml +++ b/configs/docker-compose.yaml @@ -56,7 +56,7 @@ services: ipc: host #command: bash -c "while true; do sleep 10; done" #command: bash -c "zenoh-bridge-ros2dds -r 8080 -l tcp/0.0.0.0:8888" - command: bash -c "source /opt/ros/lcas/install/setup.bash; echo $$CYCLONEDDS_URI; (code-server --auth none -an coltrane --bind-addr 0.0.0.0:9999 &);(ros2 launch astra_camera dabai.launch.py &); ros2 launch limo_bringup limo_start.launch.py" + command: bash -c "source /opt/ros/lcas/install/setup.bash; echo $$CYCLONEDDS_URI; (code-server --auth none -an ${ROBOT_NAME} --bind-addr 0.0.0.0:9999 &);(ros2 launch astra_camera dabai.launch.py &); ros2 launch limo_bringup limo_start.launch.py" volumes: - /dev:/dev - ${HOME}:/home/ros/robot_home From dd5239eda23967f0941a171d4392f9e4766d8db2 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Fri, 14 Feb 2025 16:27:43 +0000 Subject: [PATCH 7/9] feat: add pull policy to the limo_drivers container --- configs/docker-compose.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/configs/docker-compose.yaml b/configs/docker-compose.yaml index 98cbd7c..9ab4eae 100644 --- a/configs/docker-compose.yaml +++ b/configs/docker-compose.yaml @@ -38,7 +38,7 @@ services: limo_drivers: image: lcas.lincoln.ac.uk/lcas/limo_platform:2 - + pull_pulicy: always user: "ros" # expose desktop access @@ -63,7 +63,6 @@ services: - /etc/localtime:/etc/localtime:ro - /etc/timezone:/etc/timezone:ro runtime: nvidia - restart: unless-stopped shm_size: '2gb' environment: # always use virtual desktop From b2db445581bfd60fcf63c7a8c3f2e8868496c52c Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Mon, 17 Feb 2025 12:37:09 +0000 Subject: [PATCH 8/9] fix: configure pull policy and have the dev version derive more directly --- configs/docker-compose-dev.yaml | 135 ++++++++++++++++++++++++++++---- configs/docker-compose.yaml | 6 +- 2 files changed, 122 insertions(+), 19 deletions(-) diff --git a/configs/docker-compose-dev.yaml b/configs/docker-compose-dev.yaml index cc69644..13c6b9b 100644 --- a/configs/docker-compose-dev.yaml +++ b/configs/docker-compose-dev.yaml @@ -1,18 +1,44 @@ name: limo_platform services: filebrowser: - restart: no + image: filebrowser/filebrowser + pull_policy: always + networks: + - rosnet ports: - - 8080 + - 8080:8080 + volumes: + - ${HOME}:/srv + command: -r /srv --noauth -b "${HOME}" -d /tmp/database.db -p 8080 --disable-exec zenoh_router: - restart: no + image: eclipse/zenoh-bridge-ros2dds:latest + pull_policy: always + networks: + - rosnet + # expose REST API, and Zenoh API ports: - - 7447 - - 8000 + - 7447:7447 + - 8000:8000 + + # start the Zenoh router to allow remote access on port 8888 + # also allows REST API access via Zenoh on port 8080 + #command: "-r 8000 -l tcp/0.0.0.0:7447 router" + command: "-c /etc/zenoh/zenoh.json5 router" + volumes: + - /etc/localtime:/etc/localtime:ro + - /etc/timezone:/etc/timezone:ro + - ./zenoh.json5:/etc/zenoh/zenoh.json5:ro + links: + - limo_drivers + + # need to set ROS_DISTRO to the correct version for the bridge to work correctly + environment: + - ROS_DISTRO=humble limo_drivers: image: lcas.lincoln.ac.uk/lcas/limo_platform:staging + pull_policy: always build: context: .. cache_from: @@ -20,18 +46,95 @@ services: - lcas.lincoln.ac.uk/cache/lcas/limo_platform:latest - lcas.lincoln.ac.uk/lcas/limo_platform:staging - lcas.lincoln.ac.uk/lcas/limo_platform:2 + user: "ros" - args: - - BASE_IMAGE=lcas.lincoln.ac.uk/lcas/ros-docker-images:westonrobot-humble-2 - + # expose desktop access ports: - - 5801 - - 5901 - - 9999 + # port for novnc + - 5801:5801 + - 5901:5901 + # port for code-serer + - 9999:9999 - hostname: testlimo - privileged: false - command: bash -c "source /opt/ros/lcas/install/setup.bash; echo $$CYCLONEDDS_URI; code-server --auth none -an coltrane --bind-addr 0.0.0.0:9999" + # NOTE: We expect the environment varibable ROBOT_NAME to be set, e.g. in `.env` + hostname: "${ROBOT_NAME}" + # nned privileged mode to access the camera and hardware + privileged: true + ipc: host + #command: bash -c "while true; do sleep 10; done" + #command: bash -c "zenoh-bridge-ros2dds -r 8080 -l tcp/0.0.0.0:8888" + command: bash -c "source /opt/ros/lcas/install/setup.bash; echo $$CYCLONEDDS_URI; (code-server --auth none -an ${ROBOT_NAME} --bind-addr 0.0.0.0:9999 &);(ros2 launch astra_camera dabai.launch.py &); ros2 launch limo_bringup limo_start.launch.py" volumes: - runtime: - restart: no + - /dev:/dev + - ${HOME}:/home/ros/robot_home + - /etc/localtime:/etc/localtime:ro + - /etc/timezone:/etc/timezone:ro + runtime: nvidia + shm_size: '2gb' + environment: + # always use virtual desktop + - DISPLAY:1 + + # - > + # CYCLONEDDS_URI= + # + # + # + # true + # 65500B + # 4000B + # udp + # + # + # + # + # + # + # + # + # + # + # auto + # 100 + # + # + # + # 500kB + # + # + # + # info + # stderr + # + # + # + # - 'LIBGL_ALWAYS_SOFTWARE=1' + # - 'ROS_DOMAIN_ID=0' + # - 'NVIDIA_VISIBLE_DEVICES=all' + #network_mode: host + networks: + - rosnet + cap_add: + - NET_ADMIN + - SYS_PTRACE + security_opt: + - seccomp:unconfined + - apparmor:unconfined + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: 1 + capabilities: [gpu] + + +networks: + rosnet: + driver: bridge + ipam: + driver: default + config: + - subnet: 172.100.0.0/16 + driver_opts: + com.docker.network.container_iface_prefix: eth diff --git a/configs/docker-compose.yaml b/configs/docker-compose.yaml index 9ab4eae..033fd83 100644 --- a/configs/docker-compose.yaml +++ b/configs/docker-compose.yaml @@ -2,7 +2,7 @@ name: limo_platform services: filebrowser: image: filebrowser/filebrowser - restart: "unless-stopped" + pull_policy: always networks: - rosnet ports: @@ -13,7 +13,7 @@ services: zenoh_router: image: eclipse/zenoh-bridge-ros2dds:latest - restart: "unless-stopped" + pull_policy: always networks: - rosnet # expose REST API, and Zenoh API @@ -38,7 +38,7 @@ services: limo_drivers: image: lcas.lincoln.ac.uk/lcas/limo_platform:2 - pull_pulicy: always + pull_policy: always user: "ros" # expose desktop access From fcb372c1b946b31ffba4b890ac677e9dcf11ef75 Mon Sep 17 00:00:00 2001 From: Marc Hanheide Date: Mon, 17 Feb 2025 12:54:25 +0000 Subject: [PATCH 9/9] removed dedicated network IP range was pointless anyway --- configs/docker-compose-dev.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/configs/docker-compose-dev.yaml b/configs/docker-compose-dev.yaml index 13c6b9b..1de2e59 100644 --- a/configs/docker-compose-dev.yaml +++ b/configs/docker-compose-dev.yaml @@ -132,9 +132,5 @@ services: networks: rosnet: driver: bridge - ipam: - driver: default - config: - - subnet: 172.100.0.0/16 driver_opts: com.docker.network.container_iface_prefix: eth