Skip to content

Commit

Permalink
Update docker builder using newer version of Open3D
Browse files Browse the repository at this point in the history
GeneralizedICP has been now merged into the main branch of Open3D,
meaning that we don't need to build the full library from source.
  • Loading branch information
nachovizzo committed Apr 4, 2022
1 parent 4a5980f commit 62a1837
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 130 deletions.
86 changes: 0 additions & 86 deletions 3rdparty/Open3D.sh

This file was deleted.

20 changes: 0 additions & 20 deletions 3rdparty/cmake.sh

This file was deleted.

2 changes: 1 addition & 1 deletion 3rdparty/patch_pykitti.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -ex

# Obtain the location of the pykitti package
pykitti_dir=$(
python - <<-EOF
python3 - <<-EOF
import sys
import traceback
Expand Down
37 changes: 20 additions & 17 deletions docker/builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,35 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
wget \
&& rm -rf /var/lib/apt/lists/*

# Add python3 and pip aliases
RUN update-alternatives \
--install /usr/bin/python python $(which python3) 20 \
--slave /usr/bin/pip pip $(which pip3)

# Install 3rdparty dependencies, split dependencies for separate docker overlays
COPY 3rdparty/embree.sh 3rdparty/
RUN bash 3rdparty/embree.sh

# Open3D needs cmake >= 3.18
COPY 3rdparty/cmake.sh 3rdparty/
RUN bash 3rdparty/cmake.sh
# Install Open3D system dependencies
RUN apt-get update && apt-get install --no-install-recommends -y \
libgl1 \
libgomp1 \
&& rm -rf /var/lib/apt/lists/*

# Install generalized_icp branch of Open3D until reaches the main branch
COPY 3rdparty/Open3D.sh 3rdparty/
RUN bash 3rdparty/Open3D.sh
# Upgrade pip
RUN pip install --upgrade pip

# Install Python dependencies
RUN pip install --upgrade \
RUN pip install --no-cache-dir --upgrade \
black \
pybind11 \
setuptools

# Install modern version of Open3D
RUN pip install --upgrade --pre \
https://files.pythonhosted.org/packages/10/02/4f777e87131b3e111f91e16c1782da707b8b6a5777dbbe11a19e0dc7d1a3/open3d-0.15.2-cp38-cp38-manylinux_2_27_x86_64.whl

# Install puma
COPY . /puma
RUN cd /puma && pip install --upgrade . && rm -rf /puma
RUN cd /puma \
&& pip install --no-cache-dir --requirement requirements.txt \
&& pip install --no-cache-dir --upgrade . \
&& rm -rf /puma

# Install 3rdparty dependencies, split dependencies for separate docker overlays
COPY 3rdparty/embree.sh 3rdparty/
RUN bash 3rdparty/embree.sh

# Patch pykitti to avoid pulling opencv-python dependency
COPY 3rdparty/patch_pykitti.sh 3rdparty/
Expand Down
7 changes: 1 addition & 6 deletions puma/registration/o3d_aliases.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,4 @@

PointToPoint = o3d.pipelines.registration.TransformationEstimationPointToPoint
PointToPlane = o3d.pipelines.registration.TransformationEstimationPointToPlane
try:
GICP = o3d.pipelines.registration.TransformationEstimationForGeneralizedICP
except AttributeError as error:
raise SystemExit(
"Open3D with GeneralizedICP support not installed, check INSTALL.md"
)
GICP = o3d.pipelines.registration.TransformationEstimationForGeneralizedICP
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ PyYAML
easydict
matplotlib
numpy
open3d>=0.14
pykitti
tqdm
trimesh

0 comments on commit 62a1837

Please sign in to comment.