diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index b7aa7f3a..0362236f 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -16,7 +16,7 @@ jobs: NPROC: 2 steps: - name: Checkout source code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup cache uses: actions/cache@v3 with: @@ -33,7 +33,7 @@ jobs: - name: Set up Python version uses: actions/setup-python@v4 with: - python-version: "3.10" + python-version: "3.11" # Pre-installed packages: https://github.com/actions/runner-images/tree/main/images - name: Install ccache run: | diff --git a/ci/run_ci.sh b/ci/run_ci.sh index 608d3aad..08bad0cd 100755 --- a/ci/run_ci.sh +++ b/ci/run_ci.sh @@ -1,54 +1,41 @@ #!/usr/bin/env bash -# -# The following environment variables are required: -# - NPROC -# -TENSORFLOW_VER="2.8.2" -TORCH_GLNX_VER="1.13.1+cpu" -# OPENVINO_DEV_VER="2021.4.2" # Numpy version conflict with TF 2.8.2 -PIP_VER="21.1.1" -WHEEL_VER="0.38.4" -STOOLS_VER="67.3.2" -YAPF_VER="0.30.0" -PYTEST_VER="7.1.2" -PYTEST_RANDOMLY_VER="3.8.0" set -euo pipefail +NPROC=${NPROC:?'env var must be set to number of available CPUs.'} +PIP_VER="23.2.1" + echo 1. Prepare the Open3D-ML repo and install dependencies echo -export PATH_TO_OPEN3D_ML=$(pwd) +export PATH_TO_OPEN3D_ML="$PWD" +echo "$PATH_TO_OPEN3D_ML" # the build system of the main repo expects a master branch. make sure master exists git checkout -b master || true -python -m pip install -U pip==$PIP_VER \ - wheel=="$WHEEL_VER" \ - setuptools=="$STOOLS_VER" \ - yapf=="$YAPF_VER" \ - pytest=="$PYTEST_VER" \ - pytest-randomly=="$PYTEST_RANDOMLY_VER" - -python -m pip install -r requirements.txt -echo $PATH_TO_OPEN3D_ML +python -m pip install -U pip==$PIP_VER +python -m pip install -r requirements.txt \ + -r requirements-torch.txt +# -r requirements-tensorflow.txt # TF disabled on Linux (Open3D PR#6288) +# -r requirements-openvino.txt # Numpy version conflict with TF 2.8.2 cd .. python -m pip install -U Cython echo 2. clone Open3D and install dependencies echo -git clone --recursive --branch master https://github.com/isl-org/Open3D.git +git clone --branch master https://github.com/isl-org/Open3D.git ./Open3D/util/install_deps_ubuntu.sh assume-yes -python -m pip install -U tensorflow-cpu==$TENSORFLOW_VER \ - torch==${TORCH_GLNX_VER} --extra-index-url https://download.pytorch.org/whl/cpu/ -# openvino-dev=="$OPENVINO_DEV_VER" +python -m pip install -r Open3D/python/requirements.txt \ + -r Open3D/python/requirements_test.txt echo 3. Configure for bundling the Open3D-ML part echo mkdir Open3D/build pushd Open3D/build +# TF disabled on Linux (Open3D PR#6288) cmake -DBUNDLE_OPEN3D_ML=ON \ - -DOPEN3D_ML_ROOT=$PATH_TO_OPEN3D_ML \ + -DOPEN3D_ML_ROOT="${PATH_TO_OPEN3D_ML}" \ -DGLIBCXX_USE_CXX11_ABI=OFF \ - -DBUILD_TENSORFLOW_OPS=ON \ + -DBUILD_TENSORFLOW_OPS=OFF \ -DBUILD_PYTORCH_OPS=ON \ -DBUILD_GUI=ON \ -DBUILD_UNIT_TESTS=OFF \ @@ -66,12 +53,13 @@ echo popd mkdir test_workdir pushd test_workdir -mv $PATH_TO_OPEN3D_ML/tests . +mv "$PATH_TO_OPEN3D_ML/tests" . echo Add --randomly-seed=SEED to the test command to reproduce test order. python -m pytest tests -echo ... now do the same but in dev mode by setting OPEN3D_ML_ROOT -export OPEN3D_ML_ROOT=$PATH_TO_OPEN3D_ML +echo "... now do the same but in dev mode by setting OPEN3D_ML_ROOT" +echo +export OPEN3D_ML_ROOT="$PATH_TO_OPEN3D_ML" echo Add --randomly-seed=SEED to the test command to reproduce test order. python -m pytest tests unset OPEN3D_ML_ROOT