Skip to content
Snippets Groups Projects
Commit 5e43f541 authored by Guilhem Saurel's avatar Guilhem Saurel Committed by Guilhem Saurel
Browse files

Pinocchio Dockerfile

parent 0e712805
No related branches found
No related tags found
1 merge request!4Update robotpkg-test-rc.py for pinocchio v2.0.0 tests
ARG UBUNTU=bionic
FROM ubuntu:$UBUNTU
# Setup Robotpkg apt binary repository
ARG UBUNTU=bionic
RUN apt-get update -qqy && apt-get install -qqy \
build-essential \
cmake \
curl \
git \
&& echo "deb [arch=amd64] http://robotpkg.openrobots.org/packages/debian/pub $UBUNTU robotpkg" \
>> /etc/apt/sources.list.d/robotpkg.list \
&& curl http://robotpkg.openrobots.org/packages/debian/robotpkg.key | apt-key add - \
&& rm -rf /var/lib/apt/lists/*
ENV ROBOTPKG_BASE=/opt/openrobots
ENV CMAKE_PREFIX_PATH=$ROBOTPKG_BASE:$CMAKE_PREFIX_PATH \
LD_LIBRARY_PATH=$ROBOTPKG_BASE/lib:$ROBOTPKG_BASE/lib/plugin:$LD_LIBRARY_PATH \
PATH=$ROBOTPKG_BASE/bin:$ROBOTPKG_BASE/sbin:$PATH \
PKG_CONFIG_PATH=$ROBOTPKG_BASE/lib/pkgconfig:$PKG_CONFIG_PATH \
ROS_PACKAGE_PATH=$ROBOTPKG_BASE/share:$ROS_PACKAGE_PATH
# get Pinocchio dependencies
ARG PYTHON=python2
RUN apt-get update -qqy \
&& apt-get install -qqy \
$(echo $PYTHON | sed 's/2//') \
&& apt-get install -qqy \
libeigen3-dev \
liburdfdom-dev \
libtinyxml-dev \
robotpkg-hpp-fcl \
robotpkg-py$($PYTHON -V 2>&1 | sed 's/.*\([23]\)\.\([0-9]\).*/\1\2/')-eigenpy \
&& rm -rf /var/lib/apt/lists/*
# (in)validate docker build cache with the HTTP "Last-Modified" header from github
ARG NAMESPACE=stack-of-tasks
ARG BRANCH=devel
ADD https://github.com/$NAMESPACE/pinocchio/archive/$BRANCH.zip .
# but this zip doesn't come with .git nor submodules
RUN git clone --recursive --branch $BRANCH https://github.com/$NAMESPACE/pinocchio.git \
&& mkdir pinocchio/build
WORKDIR /pinocchio/build
ARG MAKE_JOBS=1
RUN cmake -DPYTHON_EXECUTABLE=$(which $PYTHON) .. \
&& make -j$(MAKE_JOBS)
CMD make test
# Pinocchio Dockerfile
If the buildfarm doesn't work in your case, you could use this.
# Build images
```
docker build -t gepetto/utils:pinocchio-18.04 .
docker build -t gepetto/utils:pinocchio-16.04 --build-arg UBUNTU=xenial .
docker build -t gepetto/utils:pinocchio-14.04 --build-arg UBUNTU=trusty .
docker build -t gepetto/utils:pinocchio-18.04-py3 --build-arg PYTHON=python3 .
```
# Push images
```
docker push gepetto/utils:pinocchio-18.04
docker push gepetto/utils:pinocchio-16.04
docker push gepetto/utils:pinocchio-14.04
docker push gepetto/utils:pinocchio-18.04-py3
```
# Pull an image
```
docker pull gepetto/utils:pinocchio-18.04
docker pull gepetto/utils:pinocchio-16.04
docker pull gepetto/utils:pinocchio-14.04
docker pull gepetto/utils:pinocchio-18.04-py3
```
# Run test
```
docker run --rm -it gepetto/utils:pinocchio-18.04
docker run --rm -it gepetto/utils:pinocchio-16.04
docker run --rm -it gepetto/utils:pinocchio-14.04
docker run --rm -it gepetto/utils:pinocchio-18.04-py3
```
# Enter in the image
```
docker run --rm -it gepetto/utils:pinocchio-18.04 bash
docker run --rm -it gepetto/utils:pinocchio-16.04 bash
docker run --rm -it gepetto/utils:pinocchio-14.04 bash
docker run --rm -it gepetto/utils:pinocchio-18.04-py3 bash
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment