-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
74 lines (63 loc) · 2.18 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
FROM ubuntu:22.04
ARG DEBIAN_FRONTEND=noninteractive
# Minimal dependencies for running Docker
# build-essential : for C++ compilation
# clang : for C++ compilation
# libc++-dev : for C++ linking (specifically used by Open3D)
# gdb : for debugging development
# locales : for file encodings
# wget : for downloading
# git : for version managment
# cmake : for compilation
# unzip : for package extraction
# cppcheck : for C++ linting
RUN apt-get update && apt-get install -y \
build-essential \
clang \
libc++-dev \
gdb \
locales \
wget \
git \
cmake \
unzip \
cppcheck \
&& rm -rf /var/lib/apt/lists/*
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
# Install C++ dependencies for ForgeScan
RUN apt-get update && apt-get install -y \
libeigen3-dev \
libhdf5-dev \
libopencv-dev \
doxygen \
&& rm -rf /var/lib/apt/lists/*
# Install Open3D with C++11
ENV Open3D_DIR=/opt/open3d-devel-linux-x86_64-cxx11-abi-0.17.0
RUN wget https://github.com/isl-org/Open3D/releases/download/v0.17.0/open3d-devel-linux-x86_64-cxx11-abi-0.17.0.tar.xz -P opt \
&& tar -xf opt/open3d-devel-linux-x86_64-cxx11-abi-0.17.0.tar.xz -C opt \
&& rm opt/open3d-devel-linux-x86_64-cxx11-abi-0.17.0.tar.xz
# Set up Python dependencies for ForgeScan
COPY ../requirements.txt .
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
&& rm -rf /var/lib/apt/lists/* \
&& pip install -r requirements.txt \
&& rm requirements.txt
# Add a non-root user for devcontainer ussage.
# See: https://code.visualstudio.com/remote/advancedcontainers/add-nonroot-user
ARG USERNAME=forgescan-dev
ARG USER_UID=1000
ARG USER_GID=$USER_UID
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME
# [Optional] Add sudo support. This can be ommited.
# && apt-get update && apt-get install -y \
# sudo \
# && rm -rf /var/lib/apt/lists/* \
# && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
# && chmod 0440 /etc/sudoers.d/$USERNAME