forked from pantor/frankx
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Put versions for all dependencies in dependency_versions and wrote re…
…usable scripts for installing dependencies
- Loading branch information
1 parent
73aa655
commit c3e66e7
Showing
11 changed files
with
134 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
EIGEN_VERSION=3.4.0 | ||
PYBIND11_VERSION=2.11.1 | ||
CATCH2_VERSION=2.13.8 | ||
LIBFRANKA_DEFAULT_VERSION=0.13.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,14 @@ | ||
services: | ||
franky-build: | ||
build: ./docker/build | ||
build: | ||
context: . | ||
dockerfile: ./docker/build/Dockerfile | ||
volumes: | ||
- ./:/code | ||
- ./build:/build | ||
franky-run: | ||
build: | ||
context: . | ||
dockerfile: ./docker/run/Dockerfile | ||
network_mode: "host" | ||
privileged: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,62 +4,23 @@ LABEL maintainer="Tim Schneider <[email protected]>" | |
|
||
RUN yum -y install poco-devel* | ||
|
||
WORKDIR /tmp | ||
|
||
RUN git clone https://gitlab.com/libeigen/eigen.git \ | ||
&& cd eigen \ | ||
&& git checkout 3.4.0 \ | ||
&& mkdir build && cd build \ | ||
&& cmake .. \ | ||
&& make install \ | ||
&& cd /tmp && rm -rf eigen | ||
|
||
RUN git clone https://github.com/catchorg/Catch2.git \ | ||
&& cd Catch2 \ | ||
&& git checkout v2.13.8 \ | ||
&& mkdir build && cd build \ | ||
&& cmake -DCATCH_BUILD_TESTING=OFF -DCATCH_ENABLE_WERROR=OFF -DCATCH_INSTALL_DOCS=OFF -DCATCH_INSTALL_HELPERS=OFF .. \ | ||
&& make install \ | ||
&& cd /tmp && rm -rf Catch2 | ||
|
||
RUN git clone https://github.com/pybind/pybind11.git \ | ||
&& cd pybind11 \ | ||
&& git checkout v2.11.1 \ | ||
&& mkdir build && cd build \ | ||
&& cmake -DPYBIND11_TEST=OFF .. \ | ||
&& make -j$(nproc) \ | ||
&& make install \ | ||
&& cd /tmp && rm -rf pybind11 | ||
ADD dependency_versions /tmp/ | ||
ADD docker/common/ /tmp/common/ | ||
ARG LIBFRANKA_VERSION | ||
RUN set -a && . /tmp/dependency_versions && set +a \ | ||
&& /tmp/common/install-dependencies | ||
|
||
ARG PYBIN_SUPPORTED_VERSIONS="cp3(7m|8|9|10|11|12)" | ||
ENV PYBIN_SUPPORTED_VERSIONS=${PYBIN_SUPPORTED_VERSIONS} | ||
RUN for PYBIN in /opt/python/*/bin; do \ | ||
if [[ "${PYBIN}" =~ ${PYBIN_SUPPORTED_VERSIONS} ]]; then \ | ||
"${PYBIN}/pip" install cmake setuptools wheel --user; \ | ||
fi; \ | ||
done \ | ||
&& ln -f -s $HOME/.local/bin/cmake /usr/bin/cmake | ||
|
||
ARG LIBFRANKA_VERSION=0.13.3 | ||
RUN git clone --recursive https://github.com/frankaemika/libfranka.git \ | ||
&& cd libfranka \ | ||
&& git checkout "${LIBFRANKA_VERSION}" \ | ||
# Cherry-pick missing imports commit | ||
&& git config user.email "[email protected]" \ | ||
&& git config user.name "John Doe" \ | ||
&& if ! git merge-base --is-ancestor f1f46fb HEAD; then git cherry-pick -m 1 f1f46fb; fi \ | ||
&& git submodule update \ | ||
&& mkdir build && cd build \ | ||
&& cmake -DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF .. \ | ||
&& make -j$(nproc) \ | ||
&& make install \ | ||
&& cd /tmp && rm -rf libfranka | ||
RUN /tmp/common/manylinux-setup-pip | ||
|
||
# Set working directory | ||
RUN mkdir -p /code | ||
RUN mkdir -p /build | ||
VOLUME /code | ||
VOLUME /build | ||
WORKDIR /build | ||
ADD build-wheels /usr/bin/ | ||
ADD run-tests /usr/bin/ | ||
ADD docker/build/build-wheels /usr/bin/ | ||
ADD docker/build/run-tests /usr/bin/ | ||
|
||
# Cleaning up | ||
RUN rm -rf /tmp/common |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
echo "Installing Catch2 version ${CATCH2_VERSION}..." | ||
TMP_DIR="$(mktemp -d)" | ||
git clone https://github.com/catchorg/Catch2.git "${TMP_DIR}" | ||
cd "${TMP_DIR}" | ||
git checkout "v${CATCH2_VERSION}" | ||
mkdir build | ||
cd build | ||
cmake -DCATCH_BUILD_TESTING=OFF -DCATCH_ENABLE_WERROR=OFF -DCATCH_INSTALL_DOCS=OFF -DCATCH_INSTALL_HELPERS=OFF .. | ||
make install | ||
cd / | ||
rm -rf "${TMP_DIR}" | ||
echo "Catch2 installed successfully" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
|
||
echo "Installing dependencies..." | ||
"${SCRIPT_DIR}/install-eigen" | ||
"${SCRIPT_DIR}/install-pybind11" | ||
"${SCRIPT_DIR}/install-catch2" | ||
"${SCRIPT_DIR}/install-libfranka" | ||
echo "Dependencies installed successfully" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
echo "Installing Eigen version ${EIGEN_VERSION}..." | ||
TMP_DIR="$(mktemp -d)" | ||
git clone https://gitlab.com/libeigen/eigen.git "${TMP_DIR}" | ||
cd "${TMP_DIR}" | ||
git checkout "${EIGEN_VERSION}" | ||
mkdir build | ||
cd build | ||
cmake .. | ||
make install | ||
cd / | ||
rm -rf "${TMP_DIR}" | ||
echo "Eigen installed successfully" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
LIBFRANKA_VERSION="${LIBFRANKA_VERSION:-${LIBFRANKA_DEFAULT_VERSION}}" | ||
echo "Installing libfranka version ${LIBFRANKA_VERSION}..." | ||
TMP_DIR="$(mktemp -d)" | ||
git clone --recursive https://github.com/frankaemika/libfranka.git "${TMP_DIR}" | ||
cd "${TMP_DIR}" | ||
|
||
git checkout "${LIBFRANKA_VERSION}" | ||
|
||
# Cherry-pick missing imports commit | ||
git config user.email "[email protected]" | ||
git config user.name "John Doe" | ||
if ! git merge-base --is-ancestor f1f46fb HEAD; then git cherry-pick -m 1 f1f46fb; fi | ||
git submodule update | ||
|
||
mkdir build | ||
cd build | ||
cmake -DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF .. | ||
make -j "$(nproc)" | ||
make install | ||
|
||
cd / | ||
rm -rf "${TMP_DIR}" | ||
echo "libfranka installed successfully" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
echo "Installing pybind11 version ${PYBIND11_VERSION}..." | ||
TMP_DIR="$(mktemp -d)" | ||
git clone https://github.com/pybind/pybind11.git "${TMP_DIR}" | ||
cd "${TMP_DIR}" | ||
git checkout "v${PYBIND11_VERSION}" | ||
mkdir build | ||
cd build | ||
cmake -DPYBIND11_TEST=OFF .. | ||
make -j "$(nproc)" | ||
make install | ||
cd / | ||
rm -rf "${TMP_DIR}" | ||
echo "pybind11 installed successfully" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
echo "Setting up pip..." | ||
for PYBIN in /opt/python/*/bin; do | ||
if [[ "${PYBIN}" =~ ${PYBIN_SUPPORTED_VERSIONS} ]]; then | ||
"${PYBIN}/pip" install setuptools wheel --user | ||
fi | ||
done | ||
echo "pip set up successfully" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,47 +5,11 @@ LABEL maintainer="Tim Schneider <[email protected]>" | |
ENV DEBIAN_FRONTEND=noninteractive | ||
RUN apt-get update && apt-get -y install build-essential cmake git libpoco-dev catch2 python3-dev | ||
|
||
WORKDIR /tmp | ||
|
||
RUN git clone https://gitlab.com/libeigen/eigen.git \ | ||
&& cd eigen \ | ||
&& git checkout 3.4.0 \ | ||
&& mkdir build && cd build \ | ||
&& cmake .. \ | ||
&& make install \ | ||
&& cd /tmp && rm -rf eigen | ||
|
||
RUN git clone https://github.com/catchorg/Catch2.git \ | ||
&& cd Catch2 \ | ||
&& git checkout v2.13.8 \ | ||
&& mkdir build && cd build \ | ||
&& cmake -DCATCH_BUILD_TESTING=OFF -DCATCH_ENABLE_WERROR=OFF -DCATCH_INSTALL_DOCS=OFF -DCATCH_INSTALL_HELPERS=OFF .. \ | ||
&& make install \ | ||
&& cd /tmp && rm -rf Catch2 | ||
|
||
RUN git clone https://github.com/pybind/pybind11.git \ | ||
&& cd pybind11 \ | ||
&& git checkout v2.11.1 \ | ||
&& mkdir build && cd build \ | ||
&& cmake -DPYBIND11_TEST=OFF .. \ | ||
&& make -j$(nproc) \ | ||
&& make install \ | ||
&& cd /tmp && rm -rf pybind11 | ||
|
||
ARG LIBFRANKA_VERSION=0.13.3 | ||
RUN git clone --recursive https://github.com/frankaemika/libfranka.git \ | ||
&& cd libfranka \ | ||
&& git checkout "${LIBFRANKA_VERSION}" \ | ||
# Cherry-pick missing imports commit | ||
&& git config user.email "[email protected]" \ | ||
&& git config user.name "John Doe" \ | ||
&& if ! git merge-base --is-ancestor f1f46fb HEAD; then git cherry-pick -m 1 f1f46fb; fi \ | ||
&& git submodule update \ | ||
&& mkdir build && cd build \ | ||
&& cmake -DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF .. \ | ||
&& make -j$(nproc) \ | ||
&& make install \ | ||
&& cd /tmp && rm -rf libfranka | ||
ADD dependency_versions /tmp/ | ||
ADD docker/common/ /tmp/common/ | ||
ARG LIBFRANKA_VERSION | ||
RUN set -a && . /tmp/dependency_versions && set +a \ | ||
&& /tmp/common/install-dependencies | ||
|
||
RUN git clone https://github.com/TimSchneider42/franky.git --recurse-submodules \ | ||
&& cd franky \ | ||
|
@@ -54,3 +18,6 @@ RUN git clone https://github.com/TimSchneider42/franky.git --recurse-submodules | |
&& make -j$(nproc) \ | ||
&& make install \ | ||
&& cd /tmp && rm -rf franky | ||
|
||
# Cleaning up | ||
RUN rm -rf /tmp/common |