Skip to content

Commit

Permalink
fix ros1 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mik-p committed Jan 26, 2024
1 parent 6229d87 commit 40b60a7
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 9 deletions.
26 changes: 22 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,31 @@

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/MPO-Web-Consulting/ros-notebook/HEAD)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)
[![ros](https://img.shields.io/badge/ROS-Noetic-blue.svg)](http://wiki.ros.org/noetic)
[![Open in Visual Studio Code](https://img.shields.io/badge/vscode-dev-blue)](https://open.vscode.dev/MPO-Web-Consulting/ros-notebook)

ros-notebook is a community maintained [Jupyter Docker Stack](https://jupyter-docker-stacks.readthedocs.io/en/latest/contributing/stacks.html) image that adds [ROS](https://www.ros.org/) to the `datascience-notebook`.
ros-notebook is a community maintained [Jupyter Docker Stack](https://jupyter-docker-stacks.readthedocs.io/en/latest/contributing/stacks.html) image that adds [ROS](https://www.ros.org/) to the common notebook containers such as the `datascience-notebook`.

## Tags

| ROS | Jupyter |
| --- | ------- |
[![ros](https://img.shields.io/badge/ROS-Noetic-blue.svg)](http://wiki.ros.org/noetic) | ![minimal-notebook](https://img.shields.io/badge/Minimal-grey.svg) ![scipy-notebook](https://img.shields.io/badge/Scipy-grey.svg) ![datascience-notebook](https://img.shields.io/badge/Data--Science-grey.svg) ![tensorflow-notebook](https://img.shields.io/badge/Tensorflow-grey.svg)
[![ros](https://img.shields.io/badge/ROS-Foxy-blue.svg)](http://wiki.ros.org/foxy) | ![minimal-notebook](https://img.shields.io/badge/Minimal-grey.svg) ![scipy-notebook](https://img.shields.io/badge/Scipy-grey.svg) ![datascience-notebook](https://img.shields.io/badge/Data--Science-grey.svg) ![tensorflow-notebook](https://img.shields.io/badge/Tensorflow-grey.svg)
[![ros](https://img.shields.io/badge/ROS-Humble-blue.svg)](http://wiki.ros.org/humble) | ![minimal-notebook](https://img.shields.io/badge/Minimal-grey.svg) ![scipy-notebook](https://img.shields.io/badge/Scipy-grey.svg) ![datascience-notebook](https://img.shields.io/badge/Data--Science-grey.svg) ![tensorflow-notebook](https://img.shields.io/badge/Tensorflow-grey.svg)
[![ros](https://img.shields.io/badge/ROS-Rolling-blue.svg)](http://wiki.ros.org/rolling) | ![minimal-notebook](https://img.shields.io/badge/Minimal-grey.svg) ![scipy-notebook](https://img.shields.io/badge/Scipy-grey.svg) ![datascience-notebook](https://img.shields.io/badge/Data--Science-grey.svg) ![tensorflow-notebook](https://img.shields.io/badge/Tensorflow-grey.svg)

tags are formed as follows:

`<ros-version>-<notebook-type>`

where `<ros-version>` is the ROS version and `<notebook-type>` is the type of notebook. For example, `noetic-minimal` is a ROS Noetic image based on the `minimal-notebook`.

## Usage

An example `Dockerfile` for a custom notebook image:

```dockerfile
FROM ghcr.io/mpo-web-consulting/ros-notebook:latest
FROM ghcr.io/mpo-web-consulting/ros-notebook:noetic-minimal

# add your customizations here
USER root
Expand All @@ -26,7 +40,11 @@ RUN mamba install -y tensorflow && \
USER ${NB_UID}
```

## Generate the Images and actions
## Generate Images and Actions

The images and actions are generated from templates using [Jinja2](https://jinja.palletsprojects.com/en/3.0.x/). The templates are located in the `templates` directory. The images are defined in `images.yaml`.

Use the following commands to generate the images and github actions files:

```bash
# generate Dockerfiles for all images
Expand Down
2 changes: 1 addition & 1 deletion images/datascience/noetic/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RUN set -eux; \
rm -rf "$GNUPGHOME"

# setup sources.list
RUN echo "deb [ signed-by=/usr/share/keyrings/ros1-latest-archive-keyring.gpg ] http://packages.ros.org/ros1/ubuntu focal main" > /etc/apt/sources.list.d/ros1-latest.list
RUN echo "deb [ signed-by=/usr/share/keyrings/ros1-latest-archive-keyring.gpg ] http://packages.ros.org/ros/ubuntu focal main" > /etc/apt/sources.list.d/ros1-latest.list

# setup environment
ENV LANG C.UTF-8
Expand Down
2 changes: 1 addition & 1 deletion images/minimal/noetic/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RUN set -eux; \
rm -rf "$GNUPGHOME"

# setup sources.list
RUN echo "deb [ signed-by=/usr/share/keyrings/ros1-latest-archive-keyring.gpg ] http://packages.ros.org/ros1/ubuntu focal main" > /etc/apt/sources.list.d/ros1-latest.list
RUN echo "deb [ signed-by=/usr/share/keyrings/ros1-latest-archive-keyring.gpg ] http://packages.ros.org/ros/ubuntu focal main" > /etc/apt/sources.list.d/ros1-latest.list

# setup environment
ENV LANG C.UTF-8
Expand Down
2 changes: 1 addition & 1 deletion images/scipy/noetic/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RUN set -eux; \
rm -rf "$GNUPGHOME"

# setup sources.list
RUN echo "deb [ signed-by=/usr/share/keyrings/ros1-latest-archive-keyring.gpg ] http://packages.ros.org/ros1/ubuntu focal main" > /etc/apt/sources.list.d/ros1-latest.list
RUN echo "deb [ signed-by=/usr/share/keyrings/ros1-latest-archive-keyring.gpg ] http://packages.ros.org/ros/ubuntu focal main" > /etc/apt/sources.list.d/ros1-latest.list

# setup environment
ENV LANG C.UTF-8
Expand Down
2 changes: 1 addition & 1 deletion images/tensorflow/noetic/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RUN set -eux; \
rm -rf "$GNUPGHOME"

# setup sources.list
RUN echo "deb [ signed-by=/usr/share/keyrings/ros1-latest-archive-keyring.gpg ] http://packages.ros.org/ros1/ubuntu focal main" > /etc/apt/sources.list.d/ros1-latest.list
RUN echo "deb [ signed-by=/usr/share/keyrings/ros1-latest-archive-keyring.gpg ] http://packages.ros.org/ros/ubuntu focal main" > /etc/apt/sources.list.d/ros1-latest.list

# setup environment
ENV LANG C.UTF-8
Expand Down
6 changes: 5 additions & 1 deletion templates/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ RUN set -eux; \
rm -rf "$GNUPGHOME"

# setup sources.list
RUN echo "deb [ signed-by=/usr/share/keyrings/{{TEMPLATE_ROS_GENERATION}}-latest-archive-keyring.gpg ] http://packages.ros.org/{{TEMPLATE_ROS_GENERATION}}/ubuntu {{TEMPLATE_UBUNTU_CODENAME}} main" > /etc/apt/sources.list.d/{{TEMPLATE_ROS_GENERATION}}-latest.list
{% set package_url_spec = 'ros' -%}
{% if TEMPLATE_ROS_GENERATION == 'ros2' -%}
{% set package_url_spec = 'ros2' -%}
{% endif -%}
RUN echo "deb [ signed-by=/usr/share/keyrings/{{TEMPLATE_ROS_GENERATION}}-latest-archive-keyring.gpg ] http://packages.ros.org/{{package_url_spec}}/ubuntu {{TEMPLATE_UBUNTU_CODENAME}} main" > /etc/apt/sources.list.d/{{TEMPLATE_ROS_GENERATION}}-latest.list

# setup environment
ENV LANG C.UTF-8
Expand Down

0 comments on commit 40b60a7

Please sign in to comment.