-
Notifications
You must be signed in to change notification settings - Fork 31
/
Dockerfile_Ubuntu2004
90 lines (77 loc) · 2.24 KB
/
Dockerfile_Ubuntu2004
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
# base image Ubuntu 20.04
FROM ubuntu:focal
ENV DEBIAN_FRONTEND=noninteractive
ARG CODE_DIR=/usr/local/src
#basic environment
RUN apt update && apt install -y \
ca-certificates \
build-essential \
git \
cmake \
cmake-curses-gui \
libace-dev \
libassimp-dev \
libglew-dev \
libglfw3-dev \
libglm-dev \
libeigen3-dev
# Suggested dependencies for YARP
RUN apt update && apt install -y \
qtbase5-dev qtdeclarative5-dev qtmultimedia5-dev \
qml-module-qtquick2 qml-module-qtquick-window2 \
qml-module-qtmultimedia qml-module-qtquick-dialogs \
qml-module-qtquick-controls qml-module-qt-labs-folderlistmodel \
qml-module-qt-labs-settings \
libqcustomplot-dev \
libgraphviz-dev \
libjpeg-dev \
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad \
gstreamer1.0-libav
# Add Metavision SDK 3.0 in sources.list
RUN echo "deb [arch=amd64 trusted=yes] https://apt.prophesee.ai/dists/public/b4b3528d/ubuntu focal sdk" >> /etc/apt/sources.list &&\
apt update
RUN apt install -y \
libcanberra-gtk-module \
mesa-utils \
ffmpeg \
libboost-program-options-dev \
libopencv-dev \
metavision-sdk
# YCM
ARG YCM_VERSION=v0.15.2
RUN cd $CODE_DIR && \
git clone --depth 1 --branch $YCM_VERSION https://github.com/robotology/ycm.git && \
cd ycm && \
mkdir build && cd build && \
cmake .. && \
make -j `nproc` install
# YARP
ARG YARP_VERSION=v3.8.0
RUN cd $CODE_DIR && \
git clone --depth 1 --branch $YARP_VERSION https://github.com/robotology/yarp.git &&\
cd yarp &&\
mkdir build && cd build &&\
cmake .. &&\
make -j `nproc` install
EXPOSE 10000/tcp 10000/udp
RUN yarp check
# event-driven
ARG ED_VERSION=main
RUN cd $CODE_DIR &&\
git clone --depth 1 --branch $ED_VERSION https://github.com/robotology/event-driven.git &&\
cd event-driven &&\
mkdir build && cd build &&\
cmake .. &&\
make -j `nproc` install
# Add User ID and Group ID
ARG UNAME=event-driven
ARG UID=1000
ARG GID=1000
RUN groupadd -g $GID -o $UNAME
RUN useradd -m -u $UID -g $GID -o -s /bin/bash $UNAME
# Change user and working directory
USER $UNAME
WORKDIR /home/${UNAME}