Skip to content

Commit 53bf720

Browse files
Developer Build: Add Open3D-ML to Open3D wheel (#2470)
* Add Open3D-ML to Open3D wheel * Install ML requirements for wheel test. * Undo windows workflow changes * Developer build from GHA CI input form * Disable checking DLLs needed by the wheel. Co-authored-by: germanros1987 <38517452+germanros1987@users.noreply.github.com>
1 parent a8fef79 commit 53bf720

File tree

5 files changed

+85
-17
lines changed

5 files changed

+85
-17
lines changed

.github/workflows/macos.yml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ name: macOS CI
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
developer_build:
7+
description: 'Set to OFF for Release wheels'
8+
required: false
9+
default: 'ON'
10+
511
push:
612
branches:
713
- master
@@ -68,11 +74,20 @@ jobs:
6874
env:
6975
BUILD_CUDA_MODULE: OFF
7076
NPROC: 2
77+
OPEN3D_ML_ROOT: ${{ github.workspace }}/Open3D-ML
78+
DEVELOPER_BUILD: ${{ github.event.inputs.developer_build }}
7179
steps:
7280
- name: Checkout source code
7381
uses: actions/checkout@v2
7482
with:
7583
submodules: true
84+
85+
- name: Checkout Open3D-ML source code
86+
uses: actions/checkout@v2
87+
with:
88+
repository: intel-isl/Open3D-ML
89+
path: ${{ env.OPEN3D_ML_ROOT }}
90+
7691
- name: Setup cache
7792
uses: actions/cache@v2
7893
with:
@@ -150,11 +165,19 @@ jobs:
150165
fail-fast: false
151166
matrix:
152167
python_version: [3.6, 3.7, 3.8]
168+
env:
169+
OPEN3D_ML_ROOT: ${{ github.workspace }}/Open3D-ML
153170
steps:
154171
- name: Checkout source code
155172
uses: actions/checkout@v2
156173
with:
157174
submodules: false
175+
- name: Checkout Open3D-ML source code
176+
uses: actions/checkout@v2
177+
with:
178+
repository: intel-isl/Open3D-ML
179+
path: ${{ env.OPEN3D_ML_ROOT }}
180+
158181
- name: Download wheels
159182
uses: actions/download-artifact@v2
160183
# See https://github.com/dawidd6/action-download-artifact for more
@@ -175,9 +198,10 @@ jobs:
175198
pi_tag=$(python -c "import sys; print(f'cp{sys.version_info.major}{sys.version_info.minor}')")
176199
python -m pip install ../open3d*-$pi_tag-*.whl
177200
echo
178-
echo "Dynamic libraries used:"
179-
DLL_PATH=$(dirname $(python -c "import open3d; print(open3d.cpu.pybind.__file__)"))/..
180-
find "$DLL_PATH"/cpu/ -type f -execdir otool -L {} \;
201+
# echo "Dynamic libraries used:"
202+
# DLL_PATH=$(dirname $(python -c "import open3d; print(open3d.cpu.pybind.__file__)"))/..
203+
# find "$DLL_PATH"/cpu/ -type f -execdir otool -L {} \;
204+
python -m pip install -r "$OPEN3D_ML_ROOT/requirements.txt"
181205
echo
182206
test_wheel
183207
- name: Run Python unit tests (benchmarks)

.github/workflows/ubuntu.yml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ name: Ubuntu CI
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
developer_build:
7+
description: 'Set to OFF for Release wheels'
8+
required: false
9+
default: 'ON'
10+
511
push:
612
branches:
713
- master
@@ -67,11 +73,20 @@ jobs:
6773
env:
6874
BUILD_CUDA_MODULE: ON
6975
NPROC: 2
76+
OPEN3D_ML_ROOT: ${{ github.workspace }}/Open3D-ML
77+
DEVELOPER_BUILD: ${{ github.event.inputs.developer_build }}
7078
steps:
7179
- name: Checkout source code
7280
uses: actions/checkout@v2
7381
with:
7482
submodules: true
83+
84+
- name: Checkout Open3D-ML source code
85+
uses: actions/checkout@v2
86+
with:
87+
repository: intel-isl/Open3D-ML
88+
path: ${{ env.OPEN3D_ML_ROOT }}
89+
7590
- name: Setup cache
7691
uses: actions/cache@v2
7792
with:
@@ -157,11 +172,19 @@ jobs:
157172
fail-fast: false
158173
matrix:
159174
python_version: [3.6, 3.7, 3.8]
175+
env:
176+
OPEN3D_ML_ROOT: ${{ github.workspace }}/Open3D-ML
160177
steps:
161178
- name: Checkout source code
162179
uses: actions/checkout@v2
163180
with:
164181
submodules: false
182+
- name: Checkout Open3D-ML source code
183+
uses: actions/checkout@v2
184+
with:
185+
repository: intel-isl/Open3D-ML
186+
path: ${{ env.OPEN3D_ML_ROOT }}
187+
165188
- name: Download wheels
166189
uses: actions/download-artifact@v2
167190
# See https://github.com/dawidd6/action-download-artifact for more
@@ -181,9 +204,10 @@ jobs:
181204
pi_tag=$(python -c "import sys; print(f'cp{sys.version_info.major}{sys.version_info.minor}')")
182205
python -m pip install ../open3d*-$pi_tag-*.whl
183206
echo
184-
echo "Dynamic libraries used:"
185-
DLL_PATH=$(dirname $(python -c "import open3d; print(open3d.cpu.pybind.__file__)"))/..
186-
find "$DLL_PATH"/{cpu,cuda}/ -type f -print -execdir ldd {} \;
207+
# echo "Dynamic libraries used:"
208+
# DLL_PATH=$(dirname $(python -c "import open3d; print(open3d.cpu.pybind.__file__)"))/..
209+
# find "$DLL_PATH"/{cpu,cuda}/ -type f -print -execdir ldd {} \;
210+
python -m pip install -r "$OPEN3D_ML_ROOT/requirements.txt"
187211
echo
188212
test_wheel
189213
- name: Run Python unit tests (benchmarks)

.github/workflows/windows.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ name: Windows CI
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
developer_build:
7+
description: 'Set to OFF for Release wheels'
8+
required: false
9+
default: 'ON'
10+
511
push:
612
branches:
713
- master
@@ -72,6 +78,8 @@ jobs:
7278
fail-fast: false
7379
matrix:
7480
python_version: [3.6, 3.7, 3.8]
81+
env:
82+
DEVELOPER_BUILD: ${{ github.event.inputs.developer_build }}
7583
steps:
7684
- name: Checkout source code
7785
uses: actions/checkout@v2
@@ -87,7 +95,10 @@ jobs:
8795
run: |
8896
mkdir build
8997
cd build
90-
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX="C:\Program Files\Open3D" -DBUILD_SHARED_LIBS=OFF -DSTATIC_WINDOWS_RUNTIME=ON ..
98+
if ($DEVELOPER_BUILD -ne "OFF") {
99+
$DEVELOPER_BUILD="ON"
100+
}
101+
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX="C:\Program Files\Open3D" -DBUILD_SHARED_LIBS=OFF -DSTATIC_WINDOWS_RUNTIME=ON -DDEVELOPER_BUILD=$DEVELOPER_BUILD ..
91102
92103
- name: Build Python package
93104
run: |

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* Fast compression mode for PNG writing. (Issue #846)
2121
* Ubuntu 20.04 (Focal) support.
2222
* Added Line3D/Ray3D/Segment3D classes with plane, point, closest-distance, and AABB tests
23+
* Add Open3D-ML to Open3D wheel
2324

2425
## 0.9.0
2526

util/ci_utils.sh

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -181,21 +181,28 @@ build_all() {
181181
build_wheel() {
182182

183183
echo "Building Open3D wheel"
184+
185+
BUILD_FILAMENT_FROM_SOURCE=OFF
186+
set +u
187+
if [ -f "${OPEN3D_ML_ROOT}/set_open3d_ml_root.sh" ]; then
188+
echo "Open3D-ML available at ${OPEN3D_ML_ROOT}. Bundling Open3D-ML in wheel."
189+
BUNDLE_OPEN3D_ML=ON
190+
else
191+
BUNDLE_OPEN3D_ML=OFF
192+
fi
193+
if [[ "$DEVELOPER_BUILD" != "OFF" ]]; then # Validate input coming from GHA input field
194+
DEVELOPER_BUILD="ON"
195+
else
196+
echo "Building for a new Open3D release"
197+
fi
198+
set -u
199+
184200
echo
185201
echo Building with CPU only...
186202
mkdir -p build
187203
cd build # PWD=Open3D/build
188-
189-
# BUILD_FILAMENT_FROM_SOURCE if Linux and old glibc (Ubuntu 18.04)
190-
BUILD_FILAMENT_FROM_SOURCE=OFF
191-
#if [[ "$OSTYPE" == linux-gnu* ]]; then
192-
# glibc_version=$(ldd --version | grep -o -E '([0-9]+\.)+[0-9]+' | head -1)
193-
# if dpkg --compare-versions "$glibc_version" lt 2.31; then
194-
# BUILD_FILAMENT_FROM_SOURCE=ON
195-
# fi
196-
#fi
197-
198204
cmakeOptions=(-DBUILD_SHARED_LIBS=OFF
205+
-DDEVELOPER_BUILD="$DEVELOPER_BUILD"
199206
-DBUILD_TENSORFLOW_OPS=ON
200207
-DBUILD_PYTORCH_OPS=ON
201208
-DBUILD_RPC_INTERFACE=ON
@@ -206,6 +213,7 @@ build_wheel() {
206213
-DCMAKE_BUILD_TYPE=Release
207214
-DBUILD_UNIT_TESTS=OFF
208215
-DBUILD_BENCHMARKS=OFF
216+
-DBUNDLE_OPEN3D_ML="$BUNDLE_OPEN3D_ML"
209217
)
210218
cmake -DBUILD_CUDA_MODULE=OFF "${cmakeOptions[@]}" ..
211219
echo

0 commit comments

Comments
 (0)