Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,18 @@ jobs:
fail-fast: false
matrix:
include:
- base_image: westonrobot/ros:humble-ci
push_tag: westonrobot

- base_image: nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04
push_tag: jammy-cuda11.8

- base_image: nvidia/cuda:12.1.0-cudnn8-devel-ubuntu22.04
push_tag: jammy-cuda12.1
# - base_image: westonrobot/ros:humble-ci
# push_tag: westonrobot

- base_image: westonrobot/ros:jazzy-latest
push_tag: westonrobot-jazzy

# - base_image: nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04
# push_tag: jammy-cuda11.8
#
# - base_image: nvidia/cuda:12.1.0-cudnn8-devel-ubuntu22.04
# push_tag: jammy-cuda12.1
#
- base_image: nvidia/cuda:12.2.2-cudnn8-devel-ubuntu22.04
push_tag: jammy-cuda12.2

Expand Down Expand Up @@ -89,8 +92,6 @@ jobs:
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
cache-from: type=registry,ref=lcas.lincoln.ac.uk/cache/${{ steps.docker_image_name.outputs.docker_image }}:${{ matrix.push_tag }}
cache-to: type=registry,ref=lcas.lincoln.ac.uk/cache/${{ steps.docker_image_name.outputs.docker_image }}:${{ matrix.push_tag }},mode=max
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
Expand Down
45 changes: 38 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,35 @@ ARG BASE_IMAGE=nvidia/cuda:11.8.0-runtime-ubuntu22.04
###########################################
FROM ${BASE_IMAGE} AS base


RUN set -eux; \
. /etc/os-release; \
codename="${VERSION_CODENAME:-$(lsb_release -sc)}"; \
arch="$(dpkg --print-architecture)"; \
# remove any inherited/broken sources definitions
rm -f /etc/apt/sources.list; \
rm -f /etc/apt/sources.list.d/*.list; \
rm -f /etc/apt/sources.list.d/*.sources; \
# recreate canonical Ubuntu sources
if [ "$arch" = "arm64" ] || [ "$arch" = "armhf" ] || [ "$arch" = "ppc64el" ] || [ "$arch" = "s390x" ]; then \
mirror="http://ports.ubuntu.com/ubuntu-ports"; \
else \
mirror="http://archive.ubuntu.com/ubuntu"; \
fi; \
printf "deb %s %s main restricted universe multiverse\n" "$mirror" "$codename" > /etc/apt/sources.list; \
printf "deb %s %s-updates main restricted universe multiverse\n" "$mirror" "$codename" >> /etc/apt/sources.list; \
printf "deb %s %s-security main restricted universe multiverse\n" "$mirror" "$codename" >> /etc/apt/sources.list; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*; \
apt-get update

ENV DEBIAN_FRONTEND=noninteractive

# Install language
RUN apt-get update ; \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
ca-certificates curl gnupg lsb-release \
locales \
&& locale-gen en_US.UTF-8 \
&& update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 \
Expand Down Expand Up @@ -92,9 +115,17 @@ RUN apt-get update && \
apt-get install -y lsb-release curl software-properties-common unzip apt-transport-https && \
rm -rf /var/lib/apt/lists/*

RUN sh -c 'echo "deb https://lcas.lincoln.ac.uk/apt/lcas $(lsb_release -sc) lcas" > /etc/apt/sources.list.d/lcas-latest.list' && \
curl -s https://lcas.lincoln.ac.uk/apt/repo_signing.gpg > /etc/apt/trusted.gpg.d/lcas-latest.gpg

RUN set -eux; \
codename="$(lsb_release -sc)"; \

curl -fsSL https://lcas.lincoln.ac.uk/apt/repo_signing.gpg \
--fail --show-error --silent --location \
--retry 8 --retry-delay 5 --retry-connrefused \
--connect-timeout 10 --max-time 180 \
-o /usr/share/keyrings/lcas-archive-keyring.gpg; \
echo "deb [signed-by=/usr/share/keyrings/lcas-archive-keyring.gpg] https://lcas.lincoln.ac.uk/apt/lcas ${codename} lcas" \
> /etc/apt/sources.list.d/lcas-latest.list

RUN mkdir -p /etc/ros/rosdep/sources.list.d/ && \
curl -o /etc/ros/rosdep/sources.list.d/20-default.list https://raw.githubusercontent.com/LCAS/rosdistro/master/rosdep/sources.list.d/20-default.list && \
curl -o /etc/ros/rosdep/sources.list.d/50-lcas.list https://raw.githubusercontent.com/LCAS/rosdistro/master/rosdep/sources.list.d/50-lcas.list
Expand Down Expand Up @@ -215,12 +246,12 @@ RUN echo "# Welcome to the L-CAS Desktop Container.\n" > /opt/image/info.md; \
echo "This is a Virtual Desktop provided by [L-CAS](https://lcas.lincoln.ac.uk/)." >> /opt/image/info.md; \
echo "You can access it via a web browser at port 5801, e.g. http://localhost:5801 (or wherever you have exposed its internal port)." >> /opt/image/info.md; \
echo "\n" >> /opt/image/info.md; \
echo "*built from https://github.com/LCAS/ros-docker-images\n(commit: [\`$(cat /opt/image/version)\`](https://github.com/LCAS/ros-docker-images/tree/$(cat /opt/image/version)/)),\nprovided to you by [L-CAS](https://lcas.lincoln.ac.uk/).*" >> /opt/image/info.md; \
echo "*built from https://github.com//ros-docker-images\n(commit: [\`$(cat /opt/image/version)\`](https://github.com//ros-docker-images/tree/$(cat /opt/image/version)/)),\nprovided to you by [L-CAS](https://.lincoln.ac.uk/).*" >> /opt/image/info.md; \
echo "\n" >> /opt/image/info.md; \
echo "## Installed Software\n" >> /opt/image/info.md; \
echo "The following software is installed:" >> /opt/image/info.md; \
echo "* The L-CAS ROS2 [apt repositories](https://lcas.lincoln.ac.uk/apt/lcas) are enabled." >> /opt/image/info.md; \
echo "* The L-CAS [rosdistro](https://github.com/LCAS/rosdistro) is enabled." >> /opt/image/info.md; \
echo "* The L-CAS ROS2 [apt repositories](https://.lincoln.ac.uk/apt/) are enabled." >> /opt/image/info.md; \
echo "* The L-CAS [rosdistro](https://github.com//rosdistro) is enabled." >> /opt/image/info.md; \
echo "* The Zenoh ROS2 bridge \`zenoh-bridge-ros2dds\` (version: ${ZENOH_BRIDGE_VERSION})." >> /opt/image/info.md; \
echo "* Node.js (with npm) in version $(node --version)." >> /opt/image/info.md; \
echo "* password-less \`sudo\` to install more packages." >> /opt/image/info.md; \
Expand All @@ -239,7 +270,7 @@ RUN mkdir -p ${HOME}/Desktop/ && \
ln -s /opt/image/info.md ${HOME}/Desktop/info.md && \
ln -s /opt/image/README.md ${HOME}/Desktop/README.md

RUN mkdir -p ~/.config/rosdistro && echo "index_url: https://raw.github.com/LCAS/rosdistro/master/index-v4.yaml" > ~/.config/rosdistro/config.yaml
RUN mkdir -p ~/.config/rosdistro && echo "index_url: https://raw.github.com//rosdistro/master/index-v4.yaml" > ~/.config/rosdistro/config.yaml

ENV DISPLAY=:1
ENV TVNC_VGL=1
Expand Down
Loading