diff options
author | Nikita Shulga <nshulga@fb.com> | 2021-08-25 09:24:27 -0700 |
---|---|---|
committer | Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> | 2021-08-25 09:25:43 -0700 |
commit | 5ab356ffe6001cc54d99096f1981ad41d9b69e93 (patch) | |
tree | 1f3a1cba28167c368ae5d885e2d91fc5f0dcc503 /.circleci | |
parent | 34ed16ffef80cf11c86a1f48d1b4930b71e19866 (diff) | |
download | pytorch-5ab356ffe6001cc54d99096f1981ad41d9b69e93.tar.gz pytorch-5ab356ffe6001cc54d99096f1981ad41d9b69e93.tar.bz2 pytorch-5ab356ffe6001cc54d99096f1981ad41d9b69e93.zip |
Update CMake minimum version to 3.10 (#63660)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/63660
Test Plan: Imported from OSS
Reviewed By: janeyx99, mruberry
Differential Revision: D30543878
fbshipit-source-id: a7d938807653f39727f2cc7d7ca167200567b6a0
Diffstat (limited to '.circleci')
-rwxr-xr-x | .circleci/docker/build.sh | 16 | ||||
-rwxr-xr-x | .circleci/docker/common/install_cmake.sh | 3 | ||||
-rwxr-xr-x | .circleci/docker/common/install_conda.sh | 4 | ||||
-rw-r--r-- | .circleci/docker/ubuntu-cuda/Dockerfile | 6 |
4 files changed, 26 insertions, 3 deletions
diff --git a/.circleci/docker/build.sh b/.circleci/docker/build.sh index 2b916a19ae..18d19ae5d5 100755 --- a/.circleci/docker/build.sh +++ b/.circleci/docker/build.sh @@ -78,11 +78,13 @@ TRAVIS_DL_URL_PREFIX="https://s3.amazonaws.com/travis-python-archives/binaries/u case "$image" in pytorch-linux-xenial-py3.8) ANACONDA_PYTHON_VERSION=3.8 + CMAKE_VERSION=3.10.3 GCC_VERSION=7 # Do not install PROTOBUF, DB, and VISION as a test ;; pytorch-linux-xenial-py3.6-gcc5.4) ANACONDA_PYTHON_VERSION=3.6 + CMAKE_VERSION=3.10.3 GCC_VERSION=5 PROTOBUF=yes DB=yes @@ -91,11 +93,13 @@ case "$image" in ;; pytorch-linux-xenial-py3.6-gcc7.2) ANACONDA_PYTHON_VERSION=3.6 + CMAKE_VERSION=3.10.3 GCC_VERSION=7 # Do not install PROTOBUF, DB, and VISION as a test ;; pytorch-linux-xenial-py3.6-gcc7) ANACONDA_PYTHON_VERSION=3.6 + CMAKE_VERSION=3.10.3 GCC_VERSION=7 PROTOBUF=yes DB=yes @@ -105,6 +109,7 @@ case "$image" in CUDA_VERSION=10.2 CUDNN_VERSION=7 ANACONDA_PYTHON_VERSION=3.6 + CMAKE_VERSION=3.10.3 GCC_VERSION=7 PROTOBUF=yes DB=yes @@ -115,6 +120,7 @@ case "$image" in CUDA_VERSION=11.1 CUDNN_VERSION=8 ANACONDA_PYTHON_VERSION=3.6 + CMAKE_VERSION=3.10.3 GCC_VERSION=7 PROTOBUF=yes DB=yes @@ -125,6 +131,7 @@ case "$image" in CUDA_VERSION=11.3.0 # Deviating from major.minor to conform to nvidia's Docker image names CUDNN_VERSION=8 ANACONDA_PYTHON_VERSION=3.6 + CMAKE_VERSION=3.10.3 GCC_VERSION=7 PROTOBUF=yes DB=yes @@ -134,6 +141,7 @@ case "$image" in pytorch-linux-xenial-py3-clang5-asan) ANACONDA_PYTHON_VERSION=3.6 CLANG_VERSION=5.0 + CMAKE_VERSION=3.10.3 PROTOBUF=yes DB=yes VISION=yes @@ -141,6 +149,7 @@ case "$image" in pytorch-linux-xenial-py3-clang7-asan) ANACONDA_PYTHON_VERSION=3.6 CLANG_VERSION=7 + CMAKE_VERSION=3.10.3 PROTOBUF=yes DB=yes VISION=yes @@ -148,6 +157,7 @@ case "$image" in pytorch-linux-xenial-py3-clang7-onnx) ANACONDA_PYTHON_VERSION=3.6 CLANG_VERSION=7 + CMAKE_VERSION=3.10.3 PROTOBUF=yes DB=yes VISION=yes @@ -155,16 +165,17 @@ case "$image" in pytorch-linux-xenial-py3-clang5-android-ndk-r19c) ANACONDA_PYTHON_VERSION=3.6 CLANG_VERSION=5.0 + CMAKE_VERSION=3.10.3 LLVMDEV=yes PROTOBUF=yes ANDROID=yes ANDROID_NDK_VERSION=r19c GRADLE_VERSION=6.8.3 - CMAKE_VERSION=3.7.0 NINJA_VERSION=1.9.0 ;; pytorch-linux-xenial-py3.6-clang7) ANACONDA_PYTHON_VERSION=3.6 + CMAKE_VERSION=3.10.3 CLANG_VERSION=7 PROTOBUF=yes DB=yes @@ -244,6 +255,9 @@ case "$image" in DB=yes VISION=yes echo "image '$image' did not match an existing build configuration" + if [[ "$image" == *xenial* ]]; then + CMAKE_VERSION=3.10.3 + fi if [[ "$image" == *py* ]]; then extract_version_from_image_name py ANACONDA_PYTHON_VERSION fi diff --git a/.circleci/docker/common/install_cmake.sh b/.circleci/docker/common/install_cmake.sh index 3ef71031db..5aa564d7c4 100755 --- a/.circleci/docker/common/install_cmake.sh +++ b/.circleci/docker/common/install_cmake.sh @@ -4,6 +4,9 @@ set -ex [ -n "$CMAKE_VERSION" ] +# Remove system cmake install so it won't get used instead +apt-get remove cmake -y + # Turn 3.6.3 into v3.6 path=$(echo "${CMAKE_VERSION}" | sed -e 's/\([0-9].[0-9]\+\).*/v\1/') file="cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz" diff --git a/.circleci/docker/common/install_conda.sh b/.circleci/docker/common/install_conda.sh index 86dbb153b2..f12ae38aa5 100755 --- a/.circleci/docker/common/install_conda.sh +++ b/.circleci/docker/common/install_conda.sh @@ -69,8 +69,8 @@ if [ -n "$ANACONDA_PYTHON_VERSION" ]; then } # Install PyTorch conda deps, as per https://github.com/pytorch/pytorch README - # DO NOT install cmake here as it would install a version newer than 3.5, but - # we want to pin to version 3.5. + # DO NOT install cmake here as it would install a version newer than 3.10, but + # we want to pin to version 3.10. SCIPY_VERSION=1.1.0 if [ "$ANACONDA_PYTHON_VERSION" = "3.9" ]; then # Install llvm-8 as it is required to compile llvmlite-0.30.0 from source diff --git a/.circleci/docker/ubuntu-cuda/Dockerfile b/.circleci/docker/ubuntu-cuda/Dockerfile index 003538f576..84075db161 100644 --- a/.circleci/docker/ubuntu-cuda/Dockerfile +++ b/.circleci/docker/ubuntu-cuda/Dockerfile @@ -65,6 +65,12 @@ ADD ./common/install_openssl.sh install_openssl.sh ENV OPENSSL_ROOT_DIR /opt/openssl RUN bash ./install_openssl.sh +# (optional) Install non-default CMake version +ARG CMAKE_VERSION +ADD ./common/install_cmake.sh install_cmake.sh +RUN if [ -n "${CMAKE_VERSION}" ]; then bash ./install_cmake.sh; fi +RUN rm install_cmake.sh + # Install ccache/sccache (do this last, so we get priority in PATH) ADD ./common/install_cache.sh install_cache.sh ENV PATH /opt/cache/bin:$PATH |