Giter Site home page Giter Site logo

pinto0309 / open3d-build Goto Github PK

View Code? Open in Web Editor NEW
14.0 3.0 1.0 25 KB

Provide Docker build sequences of Open3D for various environments.

Home Page: https://qiita.com/PINTO

License: MIT License

Dockerfile 95.18% Shell 4.82%
open3d open3d-python cuda tensorflow pytorch docker jetson jetson-nano

open3d-build's Introduction

Open3D-build

Provide Docker build sequences of Open3D for various environments.
https://github.com/intel-isl/Open3D

1. Docker Image Environment

  • Ubuntu 18.04 x86_64
    • CUDA 11.0
    • cuDNN 8.0
    • TensorFlow v2.4.1 (Build from source code. It will be downloaded automatically during docker build.)
    • PyTorch v1.7.1 (Build from source code. It will be downloaded automatically during docker build.)
  • Jetson Nano L4T r32.5.0 aarch64
    • CUDA 10.2
    • cuDNN 8.0
    • TensorFlow v2.4.1 (Build from source code. It will be downloaded automatically during docker build.)
    • PyTorch v1.7.1 (Build from source code. It will be downloaded automatically during docker build.)
  • Open3D 0.12.0

2. Default build parameters

2-1. Ubuntu 18.04 x86_64

-- ========================================================================
-- Open3D 0.12.0 Configuration Summary
-- ========================================================================
-- Enabled Features:
--   OpenMP .................................. ON
--   Headless Rendering ...................... OFF
--   Azure Kinect Support .................... ON
--   Intel RealSense Support ................. ON
--   CUDA Support ............................ ON
--   Build GUI ............................... ON
--   Build Shared Library .................... ON
--   Build Unit Tests ........................ OFF
--   Build Examples .......................... 
--   Build Python Module ..................... ON
--   - with Jupyter Notebook Support ......... ON
--   Build TensorFlow Ops .................... ON
--   Build PyTorch Ops ....................... ON
--   Build Benchmarks ........................ ON
--   Bundle Open3D-ML ........................ ON
--   Build RPC interface ..................... ON
--   Force GLIBCXX_USE_CXX11_ABI= ............ 1
-- ========================================================================
-- Third-Party Dependencies:
--   EIGEN3 .................................. yes (build from source)
--   FAISS ................................... no
--   FILAMENT ................................ yes (build from source)
--   FLANN ................................... yes (build from source)
--   FMT ..................................... yes (build from source)
--   GLEW .................................... yes (build from source)
--   GLFW .................................... yes (build from source)
--   GOOGLETEST .............................. no
--   IMGUI ................................... yes (build from source)
--   JPEG .................................... yes (build from source)
--   JSONCPP ................................. yes (build from source)
--   LIBLZF .................................. yes (build from source)
--   OPENGL .................................. yes (build from source)
--   PNG ..................................... yes (build from source)
--   PYBIND11 ................................ yes (build from source)
--   QHULL ................................... yes (build from source)
--   LIBREALSENSE ............................ yes (build from source)
--   TINYFILEDIALOGS ......................... yes (build from source)
--   TINYGLTF ................................ yes (build from source)
--   TINYOBJLOADER ........................... yes (build from source)
-- ========================================================================

2-2. Jetson Nano L4T r32.5.0 aarch64

-- ========================================================================
-- Open3D 0.12.0 Configuration Summary
-- ========================================================================
-- Enabled Features:
--   OpenMP .................................. ON
--   Headless Rendering ...................... OFF
--   Azure Kinect Support .................... ON
--   Intel RealSense Support ................. ON
--   CUDA Support ............................ ON
--   Build GUI ............................... ON
--   Build Shared Library .................... ON
--   Build Unit Tests ........................ OFF
--   Build Examples .......................... 
--   Build Python Module ..................... ON
--   - with Jupyter Notebook Support ......... ON
--   Build TensorFlow Ops .................... ON
--   Build PyTorch Ops ....................... ON
--   Build Benchmarks ........................ ON
--   Bundle Open3D-ML ........................ ON
--   Build RPC interface ..................... ON
--   Force GLIBCXX_USE_CXX11_ABI= ............ 1
-- ========================================================================
-- Third-Party Dependencies:
--   EIGEN3 .................................. yes (build from source)
--   FAISS ................................... no
--   FILAMENT ................................ yes (build from source)
--   FLANN ................................... yes (build from source)
--   FMT ..................................... yes (build from source)
--   GLEW .................................... yes (build from source)
--   GLFW .................................... yes (build from source)
--   GOOGLETEST .............................. no
--   IMGUI ................................... yes (build from source)
--   JPEG .................................... yes (build from source)
--   JSONCPP ................................. yes (build from source)
--   LIBLZF .................................. yes (build from source)
--   OPENGL .................................. yes (build from source)
--   PNG ..................................... yes (build from source)
--   PYBIND11 ................................ yes (build from source)
--   QHULL ................................... yes (build from source)
--   LIBREALSENSE ............................ yes (build from source)
--   TINYFILEDIALOGS ......................... yes (build from source)
--   TINYGLTF ................................ yes (build from source)
--   TINYOBJLOADER ........................... yes (build from source)
-- ========================================================================

3. Usage - Docker Build

You can customize the Dockerfile to build and run your own container images on your own.

3-1-1. x86_64 Build

$ version=0.12.0
$ git clone -b ${version} https://github.com/PINTO0309/Open3D-build.git
$ cd Open3D-build
$ docker build -t pinto0309/open3d-build:latest x86_64

3-1-2. aarch64 Build

$ version=0.12.0
$ git clone -b ${version} https://github.com/PINTO0309/Open3D-build.git
$ cd Open3D-build
$ docker build -t pinto0309/open3d-build:l4t-r32.5.0 aarch64/jetson_nano

3-2-1. x86_64 Run

$ docker run --gpus all -it --rm \
    -v `pwd`:/workspace \
    -e LOCAL_UID=$(id -u $USER) \
    -e LOCAL_GID=$(id -g $USER) \
    pinto0309/open3d-build:latest bash

3-2-2. aarch64 Run

3-2-2-1. aarch64 emulation on x86_64 environment

$ docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
$ docker run --gpus all -it --rm \
    -v `pwd`:/workspace \
    -e LOCAL_UID=$(id -u $USER) \
    -e LOCAL_GID=$(id -g $USER) \
    pinto0309/open3d-build:l4t-r32.5.0 bash

3-2-2-2. Running on the aarch64 environment

$ docker run --gpus all -it --rm \
    -v `pwd`:/workspace \
    -e LOCAL_UID=$(id -u $USER) \
    -e LOCAL_GID=$(id -g $USER) \
    pinto0309/open3d-build:l4t-r32.5.0 bash

4. Usage - Docker Pull / Run

You can download and run a pre-built container image from Docker Hub.

$ docker run --gpus all -it --rm \
    -v `pwd`:/workspace \
    -e LOCAL_UID=$(id -u $USER) \
    -e LOCAL_GID=$(id -g $USER) \
    pinto0309/open3d-build:latest bash

or

$ docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
$ docker run --gpus all -it --rm \
    -v `pwd`:/workspace \
    -e LOCAL_UID=$(id -u $USER) \
    -e LOCAL_GID=$(id -g $USER) \
    pinto0309/open3d-build:l4t-r32.5.0 bash

5. Usage - pip installer

You can download and install the released Wheel installer. TensorFlow and PyTorch have already been optimized and built for Open3D.

$ wget https://github.com/PINTO0309/Open3D-build/releases/download/v0.12.0/open3d-0.12.0+313315d9-cp36-cp36m-linux_x86_64.whl \
  && wget https://github.com/PINTO0309/Open3D-build/releases/download/v0.12.0/tensorflow-2.4.1-cp36-cp36m-linux_x86_64.whl \
  && wget https://github.com/PINTO0309/Open3D-build/releases/download/v0.12.0/torch-1.7.0a0-cp36-cp36m-linux_x86_64.whl \
  && wget https://github.com/PINTO0309/Open3D-build/releases/download/v0.12.0/torchaudio-0.7.0a0+a853dff-cp36-cp36m-linux_x86_64.whl \
  && wget https://github.com/PINTO0309/Open3D-build/releases/download/v0.12.0/torchvision-0.8.0a0+2f40a48-cp36-cp36m-linux_x86_64.whl \
  && sudo pip3 install --upgrade *.whl

6. Appendix

6-1. TensorFlow (CUDA enabled) build command

$ git clone -b v2.4.1 https://github.com/tensorflow/tensorflow.git
$ cd tensorflow
$ sudo ./configure
$ sudo bazel build \
    --config=cuda \
    --config=noaws \
    --config=nohdfs \
    --config=nonccl \
    --config=v2 \
    //tensorflow/tools/pip_package:build_pip_package

6-2. PyTorch (CUDA enabled) build command

https://github.com/PINTO0309/PyTorch-build

$ git clone -b v1.7.1 --recursive https://github.com/pytorch/pytorch
$ cd pytorch \
    && sed -i -e "/^#ifndef THRUST_IGNORE_CUB_VERSION_CHECK$/i #define THRUST_IGNORE_CUB_VERSION_CHECK" \
                 /usr/local/cuda/targets/x86_64-linux/include/thrust/system/cuda/config.h \
    && cat /usr/local/cuda/targets/x86_64-linux/include/thrust/system/cuda/config.h \
    && sed -i -e "/^if(DEFINED GLIBCXX_USE_CXX11_ABI)/i set(GLIBCXX_USE_CXX11_ABI 1)" \
                 CMakeLists.txt \
    && pip3 install -r requirements.txt \
    && python3 setup.py build \
    && python3 setup.py bdist_wheel \
    && cd ..

$ git clone -b v0.8.2 https://github.com/pytorch/vision.git
$ cd vision \
    && pip3 install /pytorch/dist/*.whl \
    && python3 setup.py build \
    && python3 setup.py bdist_wheel \
    && cd ..

$ git clone -b v0.7.2 https://github.com/pytorch/audio.git
$ cd audio \
    && apt-get install -y sox libsox-dev \
    && python3 setup.py build \
    && python3 setup.py bdist_wheel \
    && cd ..

open3d-build's People

Contributors

pinto0309 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

curtis18

open3d-build's Issues

Aarch64 build for Raspberry Pi

Hi @PINTO0309 Thank you for all your work! I wanted to know if there's an Aarch64 build for Raspberry Pi 64bit OS as well? The repository mentions Jetson Nano. If there is, would be really grateful to try it out. Thanks!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.