-
Notifications
You must be signed in to change notification settings - Fork 64
/
Dockerfile
100 lines (80 loc) · 2.36 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Copyright (c) 2020, Danish Technological Institute.
# All rights reserved.
#
# This source code is licensed under the GNU-style license found in the
# LICENSE file in the root directory of this source tree.
#
# Original author: Nicolai Anton Lynnerup <[email protected]>
FROM ubuntu:20.04
LABEL maintainer="Nicolai Anton Lynnerup <[email protected]> & Lars Berscheid <[email protected]>"
# Set working directory
RUN mkdir -p /code
WORKDIR /code
# ------------ #
# Install deps #
# ------------ #
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
build-essential \
cmake \
wget \
iputils-ping \
python3-dev \
python3-pip \
python3-setuptools \
# Poco for libfranka \
libpoco-dev \
# Clear cache
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install numpy
# -------------- #
# Install Eigen3 #
# -------------- #
RUN git clone https://github.com/eigenteam/eigen-git-mirror.git \
&& cd eigen-git-mirror \
&& git checkout 3.3.7 \
&& mkdir build && cd build \
&& cmake .. \
&& make install
# -------------- #
# Install Franka #
# -------------- #
ARG libfranka_version=0.7.0
RUN git clone --recursive https://github.com/frankaemika/libfranka.git \
&& cd libfranka \
&& git checkout $libfranka_version \
&& git submodule update \
&& mkdir build && cd build \
&& cmake -DBUILD_EXAMPLES=ON .. \
&& make -j$(nproc) \
&& make install
# ---------------- #
# Install PyBind11 #
# ---------------- #
RUN git clone https://github.com/pybind/pybind11.git \
&& cd pybind11 \
&& git checkout v2.6 \
&& mkdir build && cd build \
&& cmake -DPYBIND11_TEST=OFF .. \
&& make -j$(nproc) \
&& make install
# ---------------- #
# Install Catch2 #
# ---------------- #
RUN git clone https://github.com/catchorg/Catch2.git \
&& cd Catch2 \
&& git checkout v2.5.0 \
&& mkdir build && cd build \
&& cmake -DCATCH_BUILD_TESTING=OFF -DCATCH_ENABLE_WERROR=OFF -DCATCH_INSTALL_DOCS=OFF -DCATCH_INSTALL_HELPERS=OFF .. \
&& make install
# ---------------- #
# Build frankx #
# ---------------- #
RUN git clone --recursive https://github.com/pantor/frankx.git \
&& mkdir -p frankx/build && cd frankx/build \
&& cmake .. \
&& make -j$(nproc) \
&& make install \
&& ./unit-test
ENV PYTHONPATH=$PYTHONPATH:/code/frankx/build/