Skip to content

Commit

Permalink
Release 6.3.0
Browse files Browse the repository at this point in the history
Version 6.3.0 contains behind-the-scenes structural improvements to Dockerfiles and GitHub workflows
and clarifies the license requirements of the library and its dependencies.

Fixes and improvements:

- Build and push both 20.04 and 22.04 images (#314, #315, #316)
- Don't build pinocchio tests in development image (#317)
- Simplify and consolidate Dockerfiles and scripts (#319)
- Better license management (#320)
  • Loading branch information
eeberhard committed Oct 28, 2022
2 parents b7f6263 + 554e01b commit aa343aa
Show file tree
Hide file tree
Showing 34 changed files with 1,038 additions and 98 deletions.
23 changes: 18 additions & 5 deletions .github/actions/build-push/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ inputs:
options:
- 'Development dependencies'
- 'Protocol dependencies'
base_tag:
description: 'The tag of the base ubuntu image.'
required: false
options:
- '22.04'
- '20.04'
secret:
description: 'GitHub Container Registry secret'
required: true
Expand All @@ -31,13 +37,20 @@ runs:
run: |
if [ "${{ inputs.image }}" = "Development dependencies" ]; then
DOCKERFILE=Dockerfile.base
IMAGE_NAME=${{ github.repository }}/development-dependencies:latest
IMAGE_NAME=${{ github.repository }}/development-dependencies
else
DOCKERFILE=Dockerfile.proto
IMAGE_NAME=${{ github.repository }}/proto-dependencies
fi
docker buildx build --file "${DOCKERFILE}" \
--platform=linux/arm64,linux/amd64 \
--push --tag ghcr.io/${IMAGE_NAME} \
.
if [ "${{ inputs.base_tag }}" == "22.04" ]; then
docker buildx build --file ${DOCKERFILE} \
--build-arg BASE_TAG=${{ inputs.base_tag }} \
--platform=linux/arm64,linux/amd64 \
--push -t ghcr.io/${IMAGE_NAME}:22.04 -t ghcr.io/${IMAGE_NAME}:latest .
else
docker buildx build --file ${DOCKERFILE} \
--build-arg BASE_TAG=${{ inputs.base_tag }} \
--platform=linux/arm64,linux/amd64 \
--push -t ghcr.io/${IMAGE_NAME}:20.04 .
fi
shell: bash
41 changes: 36 additions & 5 deletions .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ on:
workflow_dispatch:

jobs:
build-publish-proto-dependencies:
build-publish-proto-dependencies-focal-fossa:
runs-on: ubuntu-latest
name: Build and publish proto dependencies image
name: Build and publish proto dependencies image on ubuntu 20.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2
Expand All @@ -19,12 +19,42 @@ jobs:
uses: ./.github/actions/build-push
with:
image: "Protocol dependencies"
base_tag: 20.04
secret: ${{ secrets.GITHUB_TOKEN }}

build-publish-development-dependencies:
needs: build-publish-proto-dependencies
build-publish-proto-dependencies-jammy-jellyfish:
runs-on: ubuntu-latest
name: Build and publish development dependencies image
name: Build and publish proto dependencies image on ubuntu 22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Build and Push
uses: ./.github/actions/build-push
with:
image: "Protocol dependencies"
base_tag: 22.04
secret: ${{ secrets.GITHUB_TOKEN }}

build-publish-development-dependencies-focal-fossa:
needs: build-publish-proto-dependencies-focal-fossa
runs-on: ubuntu-latest
name: Build and publish development dependencies image on ubuntu 20.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Build and Push
uses: ./.github/actions/build-push
with:
image: "Development dependencies"
base_tag: 20.04
secret: ${{ secrets.GITHUB_TOKEN }}

build-publish-development-dependencies-jammy-jellyfish:
needs: build-publish-proto-dependencies-jammy-jellyfish
runs-on: ubuntu-latest
name: Build and publish development dependencies image on ubuntu 22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2
Expand All @@ -33,4 +63,5 @@ jobs:
uses: ./.github/actions/build-push
with:
image: "Development dependencies"
base_tag: 22.04
secret: ${{ secrets.GITHUB_TOKEN }}
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# CHANGELOG

Release Versions:
- [6.3.0](#630)
- [6.2.0](#620)
- [6.1.0](#610)
- [6.0.0](#600)
Expand All @@ -14,6 +15,18 @@ Release Versions:
- [2.0.0](#200)
- [1.0.0](#100)

## 6.3.0

Version 6.3.0 contains behind-the-scenes structural improvements to Dockerfiles and GitHub workflows
and clarifies the license requirements of the library and its dependencies.

### Fixes and improvements

- Build and push both 20.04 and 22.04 images (#314, #315, #316)
- Don't build pinocchio tests in development image (#317)
- Simplify and consolidate Dockerfiles and scripts (#319)
- Better license management (#320)

## 6.2.0

Version 6.2.0 contains minor changes to the Python bindings and robot model installation dependencies.
Expand Down
38 changes: 31 additions & 7 deletions Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ubuntu:20.04 as core-build-dependencies
ARG BASE_TAG=22.04
FROM ubuntu:${BASE_TAG} as core-build-dependencies
ENV DEBIAN_FRONTEND=noninteractive

# install core compilation and access dependencies for building the libraries
Expand Down Expand Up @@ -47,7 +48,7 @@ RUN apt-get update && apt-get install -y \
WORKDIR /tmp
ARG EIGEN_TAG=3.4.0
RUN wget -c https://gitlab.com/libeigen/eigen/-/archive/${EIGEN_TAG}/eigen-${EIGEN_TAG}.tar.gz -O - | tar -xz \
&& cd eigen-${EIGEN_TAG} && mkdir build && cd build && cmake .. && make install \
&& cd eigen-${EIGEN_TAG} && mkdir build && cd build && cmake -DEIGEN_MPL2_ONLY .. && make install \
&& cd ../.. && rm -r eigen-${EIGEN_TAG} || exit 1

ARG OSQP_TAG=0.6.2
Expand All @@ -64,7 +65,7 @@ ARG PINOCCHIO_TAG=2.6.9
RUN git clone --depth 1 -b v${PINOCCHIO_TAG} --recursive https://github.com/stack-of-tasks/pinocchio \
&& cd pinocchio && mkdir build && cd build \
&& cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_PYTHON_INTERFACE=OFF \
&& make -j1 && make install && cd ../.. && rm -r pinocchio || exit 1
-DBUILD_TESTING=OFF && make -j $(nproc --ignore=1) && make install && cd ../.. && rm -r pinocchio || exit 1

RUN ldconfig

Expand All @@ -87,13 +88,36 @@ RUN pip3 install numpy setuptools pybind11
# install google dependencies
COPY --from=google-dependencies /usr/include/gtest /usr/include/gtest
COPY --from=google-dependencies /usr/local/lib/libgtest* /usr/local/lib/
COPY --from=ghcr.io/epfl-lasa/control-libraries/proto-dependencies /usr/local/include/google /usr/local/include/google
COPY --from=ghcr.io/epfl-lasa/control-libraries/proto-dependencies /usr/local/lib/libproto* /usr/local/lib/
COPY --from=ghcr.io/epfl-lasa/control-libraries/proto-dependencies /usr/local/bin/protoc /usr/local/bin


FROM development-dependencies as proto-dependencies-20.04
COPY --from=ghcr.io/epfl-lasa/control-libraries/proto-dependencies:20.04 /usr/local/include/google /usr/local/include/google
COPY --from=ghcr.io/epfl-lasa/control-libraries/proto-dependencies:20.04 /usr/local/lib/libproto* /usr/local/lib/
COPY --from=ghcr.io/epfl-lasa/control-libraries/proto-dependencies:20.04 /usr/local/bin/protoc /usr/local/bin
RUN ldconfig


FROM development-dependencies as proto-dependencies-22.04
COPY --from=ghcr.io/epfl-lasa/control-libraries/proto-dependencies:22.04 /usr/local/include/google /usr/local/include/google
COPY --from=ghcr.io/epfl-lasa/control-libraries/proto-dependencies:22.04 /usr/local/lib/libproto* /usr/local/lib/
COPY --from=ghcr.io/epfl-lasa/control-libraries/proto-dependencies:22.04 /usr/local/bin/protoc /usr/local/bin
RUN ldconfig


FROM development-dependencies as ssh-configuration
FROM development-dependencies as proto-dependencies-latest
COPY --from=ghcr.io/epfl-lasa/control-libraries/proto-dependencies:latest /usr/local/include/google /usr/local/include/google
COPY --from=ghcr.io/epfl-lasa/control-libraries/proto-dependencies:latest /usr/local/lib/libproto* /usr/local/lib/
COPY --from=ghcr.io/epfl-lasa/control-libraries/proto-dependencies:latest /usr/local/bin/protoc /usr/local/bin
RUN ldconfig


FROM proto-dependencies-${BASE_TAG} as license-information
RUN mkdir -p /usr/share/doc/control-libraries
COPY ./licenses /usr/share/doc/control-libraries/licenses


FROM license-information as ssh-configuration

RUN apt-get update && apt-get install -y \
sudo \
libssl-dev \
Expand Down
7 changes: 4 additions & 3 deletions Dockerfile.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ubuntu:20.04 as build-stage
ARG BASE_TAG=22.04
FROM ubuntu:${BASE_TAG} as build-stage
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y \
Expand All @@ -22,11 +23,11 @@ RUN wget -O protobuf-cpp-"${PROTOBUF_VERSION}".tar.gz \
WORKDIR /tmp/protobuf-3."${PROTOBUF_VERSION}"
RUN ./autogen.sh \
&& ./configure \
&& make \
&& make -j $(nproc --ignore=1) \
&& make install
FROM ubuntu:22.04 as google-dependencies
FROM ubuntu:${BASE_TAG} as google-dependencies
COPY --from=build-stage /usr/local/include/google /usr/local/include/google
COPY --from=build-stage /usr/local/lib/libproto* /usr/local/lib/
COPY --from=build-stage /usr/local/bin/protoc /usr/local/bin
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
A set of libraries to facilitate the creation of full control loop algorithms,
including trajectory planning, kinematics, dynamics and control.

Documentation is available at <a href="https://epfl-lasa.github.io/control-libraries/versions/">epfl-lasa.github.io/control-libraries</a>.
Documentation is available at <a href="https://epfl-lasa.github.io/control-libraries">epfl-lasa.github.io/control-libraries</a>.

## Core libraries

Expand All @@ -35,14 +35,19 @@ documentation, see the [protocol](./protocol) folder.

## Python bindings

There exist Python bindings for the control library modules and the protocol module. See the [python](./python)</a>
There exist Python bindings for the control library modules and the protocol module. See the [python](./python)
folder for installation instructions.

## Demos

For examples and demos in C++ and Python, refer to the [demos](./demos) folder.
TODO link ros demos repo

## License

This project is provided free and open-source under the GPLv3 license.
See the [licenses](./licenses) folder for more information.

## External resources

- C++ remote development in CLion [here](https://github.com/eeberhard/docker-clion-cpp-env)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.2.0
6.3.0
2 changes: 1 addition & 1 deletion demos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

find_package(control_libraries 6.2.0 CONFIG REQUIRED)
find_package(control_libraries 6.3.0 CONFIG REQUIRED)

set(DEMOS_SCRIPTS
task_space_control_loop
Expand Down
6 changes: 5 additions & 1 deletion demos/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ghcr.io/epfl-lasa/control-libraries/development-dependencies:latest
ARG BASE_TAG=latest
FROM ghcr.io/epfl-lasa/control-libraries/development-dependencies:${BASE_TAG} as build
ARG BRANCH=develop

WORKDIR /source
Expand All @@ -9,6 +10,9 @@ RUN pip3 install control-libraries/python

RUN rm -rf /source


FROM build as demos

USER developer
WORKDIR ${HOME}/control_loop_examples
COPY ./ ./
Expand Down
16 changes: 10 additions & 6 deletions demos/run-demo.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
#!/usr/bin/env bash

IMAGE_NAME=epfl-lasa/control-libraries/control-loop-examples
IMAGE_TAG=latest
BASE_TAG="latest"

IMAGE_NAME=epfl-lasa/control-libraries/control-loop-examples
BRANCH=$(git branch --show-current)

HELP_MESSAGE="Usage: run-demo.sh [-b <branch>] [-r] [-v]
HELP_MESSAGE="Usage: run-demo.sh [-b <branch>] [--base-tag <base-tag>] [-r] [-v]
Options:
-b, --branch <branch> Specify the branch of control libraries
that should be used to build the image.
--base-tag <base-tag> Tag of the development image.
(default: ${BASE_TAG})
-r, --rebuild Rebuild the image using the docker
--no-cache option.
-v, --verbose Use the verbose option during the building
Expand All @@ -21,6 +23,7 @@ while [[ $# -gt 0 ]]; do
opt="$1"
case $opt in
-b|--branch) BRANCH=$2; shift 2;;
--base-tag) BASE_TAG=$2; shift 2;;
-r|--rebuild) BUILD_FLAGS+=(--no-cache); shift ;;
-v|--verbose) BUILD_FLAGS+=(--progress=plain); shift ;;
-h|--help) echo "${HELP_MESSAGE}" ; exit 0 ;;
Expand All @@ -32,8 +35,9 @@ done

echo "Using control libraries branch ${BRANCH}"
BUILD_FLAGS+=(--build-arg BRANCH="${BRANCH}")
BUILD_FLAGS+=(--build-arg BASE_TAG="${BASE_TAG}")

docker pull ghcr.io/epfl-lasa/control-libraries/development-dependencies
DOCKER_BUILDKIT=1 docker build "${BUILD_FLAGS[@]}" . -t "${IMAGE_NAME}:${IMAGE_TAG}" || exit 1
docker pull ghcr.io/epfl-lasa/control-libraries/development-dependencies:"${BASE_TAG}" || exit 1
DOCKER_BUILDKIT=1 docker build "${BUILD_FLAGS[@]}" . -t "${IMAGE_NAME}":"${BASE_TAG}" || exit 1

docker run -it --rm "${IMAGE_NAME}:${IMAGE_TAG}"
docker run -it --rm "${IMAGE_NAME}":${BASE_TAG}
2 changes: 1 addition & 1 deletion doxygen/doxygen.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "Control Libraries"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 6.2.0
PROJECT_NUMBER = 6.3.0

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
23 changes: 23 additions & 0 deletions licenses/COPYING.BOOST
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Boost Software License - Version 1.0 - August 17th, 2003

Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:

The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Loading

0 comments on commit aa343aa

Please sign in to comment.