Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update min OS to Ubuntu 20.04 #6902

Merged
merged 9 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/ubuntu-cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ jobs:
fail-fast: false
matrix:
include:
- CI_CONFIG: 2-bionic
- CI_CONFIG: 3-ml-shared-bionic
- CI_CONFIG: 4-shared-bionic
- CI_CONFIG: 5-ml-focal
- CI_CONFIG: 2-focal
- CI_CONFIG: 3-ml-shared-focal
- CI_CONFIG: 4-shared-focal
- CI_CONFIG: 5-ml-jammy
env:
# Export everything from matrix to be easily used.
# Docker tag and ccache names must be consistent with docker_build.sh
CI_CONFIG : ${{ matrix.CI_CONFIG }}
BUILD_PACKAGE : ${{ contains(fromJson('["3-ml-shared-bionic", "4-shared-bionic"]'), matrix.CI_CONFIG) }}
BUILD_PACKAGE : ${{ contains(fromJson('["3-ml-shared-focal", "4-shared-focal"]'), matrix.CI_CONFIG) }}
GCE_INSTANCE_PREFIX: open3d-ci-${{ matrix.CI_CONFIG }}
DOCKER_TAG : open3d-ci:${{ matrix.CI_CONFIG }}
CCACHE_TAR_NAME : open3d-ci-${{ matrix.CI_CONFIG }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu-wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
env:
DEVELOPER_BUILD: ${{ github.event.inputs.developer_build || 'ON' }}
PYTHON_VERSION: ${{ matrix.python_version }}
CCACHE_TAR_NAME: open3d-ubuntu-1804-cuda-ci-ccache
CCACHE_TAR_NAME: open3d-ubuntu-2004-cuda-ci-ccache
OPEN3D_CPU_RENDERING: true
steps:
- name: Checkout source code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vtk_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
permissions:
contents: write
# TODO: Convert to docker
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- name: Checkout source code
uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/webrtc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, macos-11]
os: [ubuntu-20.04, macos-12]
GLIBCXX_USE_CXX11_ABI: [0, 1]
exclude:
- os: macos-11
- os: macos-12
GLIBCXX_USE_CXX11_ABI: 0
env:
GLIBCXX_USE_CXX11_ABI: ${{ matrix.GLIBCXX_USE_CXX11_ABI }}
Expand All @@ -48,7 +48,7 @@ jobs:
python-version: 3.8

- name: Install dependencies
if: ${{ matrix.os == 'ubuntu-18.04' }}
if: ${{ matrix.os == 'ubuntu-20.04' }}
run: |
source 3rdparty/webrtc/webrtc_build.sh
install_dependencies_ubuntu
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/curl/curl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ else()
# Optimize for Ubuntu x86. Curl can take a long time to configure.
#
# To generate pre-compiled curl:
# 1. Use Ubuntu 18.04 (eg. in docker), not 20.04+.
# 1. Use oldest supported Ubuntu (eg. in docker), not the latest.
# 2. -DBUILD_CURL_FROM_SOURCE=ON, build Open3D: make ext_curl
# 3. cd build/curl
# 4. tar -czvf curl_7.88.0_linux_x86_64.tar.gz include lib
Expand Down
18 changes: 0 additions & 18 deletions 3rdparty/find_dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1405,24 +1405,6 @@ else()
endif()
list(APPEND Open3D_3RDPARTY_HEADER_TARGETS_FROM_SYSTEM Open3D::3rdparty_opengl)

# CPU Rendering
if(BUILD_GUI AND UNIX AND NOT APPLE)
include(FetchContent)
FetchContent_Declare(
download_mesa_libgl
PREFIX mesa
URL https://github.com/isl-org/open3d_downloads/releases/download/mesa-libgl/mesa_libGL_22.1.4.tar.bz2
URL_HASH SHA256=5732bfb70e8fcc747018820bc8fd31cd1867ebae5aa09baf65482b42c134d45a
DOWNLOAD_DIR "${OPEN3D_THIRD_PARTY_DOWNLOAD_DIR}/mesa"
)
FetchContent_MakeAvailable(download_mesa_libgl)

set(MESA_CPU_GL_LIBRARY "${download_mesa_libgl_SOURCE_DIR}/libGL.so.1.2.0" "${download_mesa_libgl_SOURCE_DIR}/libEGL.so.1.0.0"
"${download_mesa_libgl_SOURCE_DIR}/libgallium_dri.so" "${download_mesa_libgl_SOURCE_DIR}/kms_swrast_dri.so"
"${download_mesa_libgl_SOURCE_DIR}/swrast_dri.so")
message(STATUS "MESA_CPU_GL_LIBRARY: ${MESA_CPU_GL_LIBRARY}")
endif()

# RPC interface
# zeromq
if(USE_SYSTEM_ZEROMQ)
Expand Down
62 changes: 0 additions & 62 deletions 3rdparty/mesa/build-mesa-cpu.sh

This file was deleted.

2 changes: 1 addition & 1 deletion 3rdparty/webrtc/Dockerfile.webrtc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# - docker run --rm --entrypoint cat open3d-webrtc:abi1 \
# webrtc_60e6748_cxx-abi-1.tar.gz > webrtc_60e6748_cxx-abi-1.tar.gz

FROM ubuntu:18.04
FROM ubuntu:20.04

ARG SUDO=command
COPY 3rdparty/webrtc 3rdparty/webrtc
Expand Down
52 changes: 43 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
cmake_minimum_required(VERSION 3.22)
# If you're using Ubuntu 18.04, we suggest you install the latest CMake from the
cmake_minimum_required(VERSION 3.24)
# If you're using Ubuntu 20.04, we suggest you install the latest CMake from the
# official repository https://apt.kitware.com/.
# CMake 3.24+ is required for CUDA native arch selection
# CMake 3.22+ is required by Assimp v5.4.2
# CMake 3.20+ is required to detect IntelLLVM compiler for SYCL

Expand Down Expand Up @@ -401,17 +402,44 @@ cmake_language(EVAL CODE "cmake_language(DEFER CALL open3d_patch_findthreads_mod

# Build CUDA module by default if CUDA is available
if(BUILD_CUDA_MODULE)
include(Open3DMakeCudaArchitectures)
open3d_make_cuda_architectures(CUDA_ARCHS)
set(CMAKE_CUDA_ARCHITECTURES ${CUDA_ARCHS})

message(STATUS "Using CUDA architectures: ${CMAKE_CUDA_ARCHITECTURES}")
if(BUILD_COMMON_CUDA_ARCHS)
if (CMAKE_CUDA_ARCHITECTURES)
message(STATUS "Building with user-provided architectures: ${CMAKE_CUDA_ARCHITECTURES}")
else()
# Build with all supported architectures for previous 2 generations and
# M0 (minor=0) architectures for previous generations (including
# deprecated). Note that cubin for M0 runs on GPUs with architecture Mx.
# This is a tradeoff between binary size / build time and runtime on
# older architectures. See:
# https://docs.nvidia.com/cuda/cuda-c-best-practices-guide/index.html#building-for-maximum-compatibility
# https://docs.nvidia.com/cuda/ampere-compatibility-guide/index.html#application-compatibility-on-ampere
# https://en.wikipedia.org/wiki/CUDA#GPUs_supported
find_package(CUDAToolkit REQUIRED)
if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL "11.8")
set(CMAKE_CUDA_ARCHITECTURES 75-real 80-real 86-real 89-real 90) # Turing, Ampere, Ada Lovelace, Hopper
elseif(CUDAToolkit_VERSION VERSION_GREATER_EQUAL "11.1")
set(CMAKE_CUDA_ARCHITECTURES 70-real 75-real 80-real 86) # Volta, Turing, Ampere
elseif(CUDAToolkit_VERSION VERSION_GREATER_EQUAL "11.0")
set(CMAKE_CUDA_ARCHITECTURES 60-real 70-real 72-real 75-real 80) # Pascal, Volta, Turing, Ampere
else()
set(CMAKE_CUDA_ARCHITECTURES 30-real 50-real 60-real 70-real 75) # Kepler, Maxwell, Pascal, Turing
endif()
message(STATUS "Using CUDA architectures: ${CMAKE_CUDA_ARCHITECTURES}")
endif()
else()
execute_process(COMMAND nvidia-smi RESULT_VARIABLE NVIDIA_CHECK OUTPUT_QUIET)
if (NVIDIA_CHECK EQUAL 0)
message(STATUS "Building with native CUDA architecture.")
set(CMAKE_CUDA_ARCHITECTURES native)
else()
message(WARNING "No CUDA GPU detected. Building with CMake default CUDA architecture.")
endif()
endif()
enable_language(CUDA)

if (CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA" AND CMAKE_CUDA_COMPILER_VERSION VERSION_LESS "10.1")
message(FATAL_ERROR "CUDA 10.0 and older are not supported. Please upgrade to CUDA 10.1 or newer.")
endif()
endif ()
endif()

# ISPC language emulation support
include(Open3DISPC)
Expand Down Expand Up @@ -488,6 +516,12 @@ macro(add_source_group module_name)
source_group("Source Files\\Material" FILES ${MODULE_MATERIAL_FILES})
endmacro()

if (LINUX_AARCH64)
# Fix for ImportError: ... /pybind.cpython-310-aarch64-linux-gnu.so: cannot allocate memory in static TLS block
# https://bugs.launchpad.net/ubuntu/+source/mysql-8.0/+bug/1889851
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftls-model=global-dynamic")
endif()

# Include convenience functions
include(Open3DLink3rdpartyLibraries)
include(Open3DSetGlobalProperties)
Expand Down
78 changes: 0 additions & 78 deletions cmake/Open3DMakeCudaArchitectures.cmake

This file was deleted.

3 changes: 1 addition & 2 deletions cpp/pybind/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ set_target_properties(pybind PROPERTIES
# libc++.so is a linker script including libc++.so.1 and libc++abi.so, so append 1 to libc++.so
set(PYTHON_EXTRA_LIBRARIES "")
if (BUILD_GUI AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
list(APPEND PYTHON_EXTRA_LIBRARIES ${CPP_LIBRARY}.1 ${CPPABI_LIBRARY}
${MESA_CPU_GL_LIBRARY})
list(APPEND PYTHON_EXTRA_LIBRARIES ${CPP_LIBRARY}.1 ${CPPABI_LIBRARY})
endif()
if (WITH_OPENMP AND APPLE AND NOT BUILD_SHARED_LIBS)
# Package libomp v11.1.0, if it is not installed. Later version cause crash on
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.7.1-cudnn8-devel-ubuntu18.04
ARG BASE_IMAGE=nvidia/cuda:11.7.1-cudnn8-devel-ubuntu20.04
FROM ${BASE_IMAGE}

# Customizable build arguments from cuda.yml
Expand Down
Loading
Loading