Skip to content

Commit

Permalink
Update CI to use requirements files
Browse files Browse the repository at this point in the history
Turn off tensorflow in Ubuntu CI
  • Loading branch information
ssheorey committed Oct 23, 2023
1 parent 29be119 commit a4284d9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 34 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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: |
Expand Down
52 changes: 20 additions & 32 deletions ci/run_ci.sh
Original file line number Diff line number Diff line change
@@ -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 \
Expand All @@ -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
Expand Down

0 comments on commit a4284d9

Please sign in to comment.