From b1604bb892d1e7f0b875dadba2767215c67aa677 Mon Sep 17 00:00:00 2001 From: Francisco Massa Date: Wed, 4 Sep 2019 10:59:36 +0200 Subject: [PATCH 1/7] [WIP] Add CircleCI for CI --- .travis.yml | 76 -------------------------------------- packaging/pkg_helpers.bash | 3 +- 2 files changed, 2 insertions(+), 77 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index fc0aa7240a4..00000000000 --- a/.travis.yml +++ /dev/null @@ -1,76 +0,0 @@ -language: python - -dist: xenial -matrix: - include: - - env: FORMAT_CHECK - language: cpp - addons: - apt: - sources: - - llvm-toolchain-xenial-7 - packages: - - clang-7 - - clang-format-7 - before_install: skip - install: skip - script: ./travis-scripts/run-clang-format/run-clang-format.py -r torchvision/csrc - - env: LINT_CHECK - python: "2.7" - install: pip install flake8 - script: flake8 - after_success: [] - - python: "2.7" - env: IMAGE_BACKEND=Pillow-SIMD - - python: "2.7" - - python: "3.6" - env: IMAGE_BACKEND=Pillow-SIMD - - python: "3.6" - -before_install: - - sudo apt-get update - - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; - - bash miniconda.sh -b -p $HOME/miniconda - - export PATH="$HOME/miniconda/bin:$PATH" - - hash -r - - conda config --set always_yes yes --set changeps1 no - - conda update -q conda - # Useful for debugging any issues with conda - - conda info -a - - - conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION pytorch scipy -c pytorch-nightly - - source activate test-environment - - | - if [[ "$IMAGE_BACKEND" == "Pillow-SIMD" ]]; then - pip uninstall -y pillow && CC="cc -march=native" pip install --force-reinstall pillow-simd - fi - - pip install future - - pip install pytest pytest-cov codecov - - pip install mock - - conda install av -c conda-forge - - -install: - # Using pip instead of setup.py ensures we install a non-compressed version of the package - # (as opposed to an egg), which is necessary to collect coverage. - # We still get the benefit of testing an installed version over the - # test version to iron out installation file-inclusion bugs but can - # also collect coverage. - - pip install . - # Move to home dir, otherwise we'll end up with the path to the - # package in $PWD rather than the installed v - - | - cd $HOME - export TV_INSTALL_PATH="$(python -c 'import os; import torchvision; print(os.path.dirname(os.path.abspath(torchvision.__file__)))')" - echo "$TV_INSTALL_PATH" - cd - - -script: - - pytest --cov-config .coveragerc --cov torchvision --cov $TV_INSTALL_PATH test - -after_success: - # Necessary to run coverage combine to rewrite paths from - # /travis/env/path/site-packages/torchvision to actual path - - coverage combine .coverage - - coverage report - - codecov diff --git a/packaging/pkg_helpers.bash b/packaging/pkg_helpers.bash index bd9cbedcdef..51c98b7dd7f 100644 --- a/packaging/pkg_helpers.bash +++ b/packaging/pkg_helpers.bash @@ -45,7 +45,8 @@ setup_cuda() { export VERSION_SUFFIX="$PYTORCH_VERSION_SUFFIX" # If the suffix is non-empty, we will use a wheel subdirectory if [[ -n "$PYTORCH_VERSION_SUFFIX" ]]; then - export WHEEL_DIR="$PYTORCH_VERSION_SUFFIX/" + # export WHEEL_DIR="$PYTORCH_VERSION_SUFFIX/" + export WHEEL_DIR="$CU_VERSION/" fi fi fi From 9b80188a1a0343100dfc896347878834307a077f Mon Sep 17 00:00:00 2001 From: Francisco Massa Date: Wed, 4 Sep 2019 11:02:17 +0200 Subject: [PATCH 2/7] Make jobs only run on master --- .circleci/config.yml | 288 ++++++++++++++++++++++++++++++++++++++++ .circleci/config.yml.in | 4 + 2 files changed, 292 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index a5be618c982..4df468321d7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -175,159 +175,303 @@ workflows: name: binary_linux_wheel_py2.7_cpu python_version: "2.7" cu_version: "cpu" + filters: + branches: + only: + - master - binary_linux_wheel: name: binary_linux_wheel_py2.7u_cpu python_version: "2.7" cu_version: "cpu" + filters: + branches: + only: + - master unicode_abi: "1" - binary_linux_wheel: name: binary_linux_wheel_py2.7_cu92 python_version: "2.7" cu_version: "cu92" + filters: + branches: + only: + - master wheel_docker_image: "soumith/manylinux-cuda92" - binary_linux_wheel: name: binary_linux_wheel_py2.7u_cu92 python_version: "2.7" cu_version: "cu92" + filters: + branches: + only: + - master unicode_abi: "1" wheel_docker_image: "soumith/manylinux-cuda92" - binary_linux_wheel: name: binary_linux_wheel_py2.7_cu100 python_version: "2.7" cu_version: "cu100" + filters: + branches: + only: + - master - binary_linux_wheel: name: binary_linux_wheel_py2.7u_cu100 python_version: "2.7" cu_version: "cu100" + filters: + branches: + only: + - master unicode_abi: "1" - binary_linux_wheel: name: binary_linux_wheel_py3.5_cpu python_version: "3.5" cu_version: "cpu" + filters: + branches: + only: + - master - binary_linux_wheel: name: binary_linux_wheel_py3.5_cu92 python_version: "3.5" cu_version: "cu92" + filters: + branches: + only: + - master wheel_docker_image: "soumith/manylinux-cuda92" - binary_linux_wheel: name: binary_linux_wheel_py3.5_cu100 python_version: "3.5" cu_version: "cu100" + filters: + branches: + only: + - master - binary_linux_wheel: name: binary_linux_wheel_py3.6_cpu python_version: "3.6" cu_version: "cpu" + filters: + branches: + only: + - master - binary_linux_wheel: name: binary_linux_wheel_py3.6_cu92 python_version: "3.6" cu_version: "cu92" + filters: + branches: + only: + - master wheel_docker_image: "soumith/manylinux-cuda92" - binary_linux_wheel: name: binary_linux_wheel_py3.6_cu100 python_version: "3.6" cu_version: "cu100" + filters: + branches: + only: + - master - binary_linux_wheel: name: binary_linux_wheel_py3.7_cpu python_version: "3.7" cu_version: "cpu" + filters: + branches: + only: + - master - binary_linux_wheel: name: binary_linux_wheel_py3.7_cu92 python_version: "3.7" cu_version: "cu92" + filters: + branches: + only: + - master wheel_docker_image: "soumith/manylinux-cuda92" - binary_linux_wheel: name: binary_linux_wheel_py3.7_cu100 python_version: "3.7" cu_version: "cu100" + filters: + branches: + only: + - master - binary_macos_wheel: name: binary_macos_wheel_py2.7_cpu python_version: "2.7" cu_version: "cpu" + filters: + branches: + only: + - master - binary_macos_wheel: name: binary_macos_wheel_py2.7u_cpu python_version: "2.7" cu_version: "cpu" + filters: + branches: + only: + - master unicode_abi: "1" - binary_macos_wheel: name: binary_macos_wheel_py3.5_cpu python_version: "3.5" cu_version: "cpu" + filters: + branches: + only: + - master - binary_macos_wheel: name: binary_macos_wheel_py3.6_cpu python_version: "3.6" cu_version: "cpu" + filters: + branches: + only: + - master - binary_macos_wheel: name: binary_macos_wheel_py3.7_cpu python_version: "3.7" cu_version: "cpu" + filters: + branches: + only: + - master - binary_linux_conda: name: binary_linux_conda_py2.7_cpu python_version: "2.7" cu_version: "cpu" + filters: + branches: + only: + - master - binary_linux_conda: name: binary_linux_conda_py2.7_cu92 python_version: "2.7" cu_version: "cu92" + filters: + branches: + only: + - master wheel_docker_image: "soumith/manylinux-cuda92" - binary_linux_conda: name: binary_linux_conda_py2.7_cu100 python_version: "2.7" cu_version: "cu100" + filters: + branches: + only: + - master - binary_linux_conda: name: binary_linux_conda_py3.5_cpu python_version: "3.5" cu_version: "cpu" + filters: + branches: + only: + - master - binary_linux_conda: name: binary_linux_conda_py3.5_cu92 python_version: "3.5" cu_version: "cu92" + filters: + branches: + only: + - master wheel_docker_image: "soumith/manylinux-cuda92" - binary_linux_conda: name: binary_linux_conda_py3.5_cu100 python_version: "3.5" cu_version: "cu100" + filters: + branches: + only: + - master - binary_linux_conda: name: binary_linux_conda_py3.6_cpu python_version: "3.6" cu_version: "cpu" + filters: + branches: + only: + - master - binary_linux_conda: name: binary_linux_conda_py3.6_cu92 python_version: "3.6" cu_version: "cu92" + filters: + branches: + only: + - master wheel_docker_image: "soumith/manylinux-cuda92" - binary_linux_conda: name: binary_linux_conda_py3.6_cu100 python_version: "3.6" cu_version: "cu100" + filters: + branches: + only: + - master - binary_linux_conda: name: binary_linux_conda_py3.7_cpu python_version: "3.7" cu_version: "cpu" + filters: + branches: + only: + - master - binary_linux_conda: name: binary_linux_conda_py3.7_cu92 python_version: "3.7" cu_version: "cu92" + filters: + branches: + only: + - master wheel_docker_image: "soumith/manylinux-cuda92" - binary_linux_conda: name: binary_linux_conda_py3.7_cu100 python_version: "3.7" cu_version: "cu100" + filters: + branches: + only: + - master - binary_macos_conda: name: binary_macos_conda_py2.7_cpu python_version: "2.7" cu_version: "cpu" + filters: + branches: + only: + - master - binary_macos_conda: name: binary_macos_conda_py3.5_cpu python_version: "3.5" cu_version: "cpu" + filters: + branches: + only: + - master - binary_macos_conda: name: binary_macos_conda_py3.6_cpu python_version: "3.6" cu_version: "cpu" + filters: + branches: + only: + - master - binary_macos_conda: name: binary_macos_conda_py3.7_cpu python_version: "3.7" cu_version: "cpu" + filters: + branches: + only: + - master nightly: triggers: @@ -344,6 +488,10 @@ workflows: name: nightly_binary_linux_wheel_py2.7_cpu python_version: "2.7" cu_version: "cpu" + filters: + branches: + only: + - master - binary_wheel_upload: name: nightly_binary_linux_wheel_py2.7_cpu_upload context: org-member @@ -354,6 +502,10 @@ workflows: name: nightly_binary_linux_wheel_py2.7u_cpu python_version: "2.7" cu_version: "cpu" + filters: + branches: + only: + - master unicode_abi: "1" - binary_wheel_upload: name: nightly_binary_linux_wheel_py2.7u_cpu_upload @@ -365,6 +517,10 @@ workflows: name: nightly_binary_linux_wheel_py2.7_cu92 python_version: "2.7" cu_version: "cu92" + filters: + branches: + only: + - master wheel_docker_image: "soumith/manylinux-cuda92" - binary_wheel_upload: name: nightly_binary_linux_wheel_py2.7_cu92_upload @@ -376,6 +532,10 @@ workflows: name: nightly_binary_linux_wheel_py2.7u_cu92 python_version: "2.7" cu_version: "cu92" + filters: + branches: + only: + - master unicode_abi: "1" wheel_docker_image: "soumith/manylinux-cuda92" - binary_wheel_upload: @@ -388,6 +548,10 @@ workflows: name: nightly_binary_linux_wheel_py2.7_cu100 python_version: "2.7" cu_version: "cu100" + filters: + branches: + only: + - master - binary_wheel_upload: name: nightly_binary_linux_wheel_py2.7_cu100_upload context: org-member @@ -398,6 +562,10 @@ workflows: name: nightly_binary_linux_wheel_py2.7u_cu100 python_version: "2.7" cu_version: "cu100" + filters: + branches: + only: + - master unicode_abi: "1" - binary_wheel_upload: name: nightly_binary_linux_wheel_py2.7u_cu100_upload @@ -409,6 +577,10 @@ workflows: name: nightly_binary_linux_wheel_py3.5_cpu python_version: "3.5" cu_version: "cpu" + filters: + branches: + only: + - master - binary_wheel_upload: name: nightly_binary_linux_wheel_py3.5_cpu_upload context: org-member @@ -419,6 +591,10 @@ workflows: name: nightly_binary_linux_wheel_py3.5_cu92 python_version: "3.5" cu_version: "cu92" + filters: + branches: + only: + - master wheel_docker_image: "soumith/manylinux-cuda92" - binary_wheel_upload: name: nightly_binary_linux_wheel_py3.5_cu92_upload @@ -430,6 +606,10 @@ workflows: name: nightly_binary_linux_wheel_py3.5_cu100 python_version: "3.5" cu_version: "cu100" + filters: + branches: + only: + - master - binary_wheel_upload: name: nightly_binary_linux_wheel_py3.5_cu100_upload context: org-member @@ -440,6 +620,10 @@ workflows: name: nightly_binary_linux_wheel_py3.6_cpu python_version: "3.6" cu_version: "cpu" + filters: + branches: + only: + - master - binary_wheel_upload: name: nightly_binary_linux_wheel_py3.6_cpu_upload context: org-member @@ -450,6 +634,10 @@ workflows: name: nightly_binary_linux_wheel_py3.6_cu92 python_version: "3.6" cu_version: "cu92" + filters: + branches: + only: + - master wheel_docker_image: "soumith/manylinux-cuda92" - binary_wheel_upload: name: nightly_binary_linux_wheel_py3.6_cu92_upload @@ -461,6 +649,10 @@ workflows: name: nightly_binary_linux_wheel_py3.6_cu100 python_version: "3.6" cu_version: "cu100" + filters: + branches: + only: + - master - binary_wheel_upload: name: nightly_binary_linux_wheel_py3.6_cu100_upload context: org-member @@ -471,6 +663,10 @@ workflows: name: nightly_binary_linux_wheel_py3.7_cpu python_version: "3.7" cu_version: "cpu" + filters: + branches: + only: + - master - binary_wheel_upload: name: nightly_binary_linux_wheel_py3.7_cpu_upload context: org-member @@ -481,6 +677,10 @@ workflows: name: nightly_binary_linux_wheel_py3.7_cu92 python_version: "3.7" cu_version: "cu92" + filters: + branches: + only: + - master wheel_docker_image: "soumith/manylinux-cuda92" - binary_wheel_upload: name: nightly_binary_linux_wheel_py3.7_cu92_upload @@ -492,6 +692,10 @@ workflows: name: nightly_binary_linux_wheel_py3.7_cu100 python_version: "3.7" cu_version: "cu100" + filters: + branches: + only: + - master - binary_wheel_upload: name: nightly_binary_linux_wheel_py3.7_cu100_upload context: org-member @@ -502,6 +706,10 @@ workflows: name: nightly_binary_macos_wheel_py2.7_cpu python_version: "2.7" cu_version: "cpu" + filters: + branches: + only: + - master - binary_wheel_upload: name: nightly_binary_macos_wheel_py2.7_cpu_upload context: org-member @@ -512,6 +720,10 @@ workflows: name: nightly_binary_macos_wheel_py2.7u_cpu python_version: "2.7" cu_version: "cpu" + filters: + branches: + only: + - master unicode_abi: "1" - binary_wheel_upload: name: nightly_binary_macos_wheel_py2.7u_cpu_upload @@ -523,6 +735,10 @@ workflows: name: nightly_binary_macos_wheel_py3.5_cpu python_version: "3.5" cu_version: "cpu" + filters: + branches: + only: + - master - binary_wheel_upload: name: nightly_binary_macos_wheel_py3.5_cpu_upload context: org-member @@ -533,6 +749,10 @@ workflows: name: nightly_binary_macos_wheel_py3.6_cpu python_version: "3.6" cu_version: "cpu" + filters: + branches: + only: + - master - binary_wheel_upload: name: nightly_binary_macos_wheel_py3.6_cpu_upload context: org-member @@ -543,6 +763,10 @@ workflows: name: nightly_binary_macos_wheel_py3.7_cpu python_version: "3.7" cu_version: "cpu" + filters: + branches: + only: + - master - binary_wheel_upload: name: nightly_binary_macos_wheel_py3.7_cpu_upload context: org-member @@ -553,6 +777,10 @@ workflows: name: nightly_binary_linux_conda_py2.7_cpu python_version: "2.7" cu_version: "cpu" + filters: + branches: + only: + - master - binary_conda_upload: name: nightly_binary_linux_conda_py2.7_cpu_upload context: org-member @@ -562,6 +790,10 @@ workflows: name: nightly_binary_linux_conda_py2.7_cu92 python_version: "2.7" cu_version: "cu92" + filters: + branches: + only: + - master wheel_docker_image: "soumith/manylinux-cuda92" - binary_conda_upload: name: nightly_binary_linux_conda_py2.7_cu92_upload @@ -572,6 +804,10 @@ workflows: name: nightly_binary_linux_conda_py2.7_cu100 python_version: "2.7" cu_version: "cu100" + filters: + branches: + only: + - master - binary_conda_upload: name: nightly_binary_linux_conda_py2.7_cu100_upload context: org-member @@ -581,6 +817,10 @@ workflows: name: nightly_binary_linux_conda_py3.5_cpu python_version: "3.5" cu_version: "cpu" + filters: + branches: + only: + - master - binary_conda_upload: name: nightly_binary_linux_conda_py3.5_cpu_upload context: org-member @@ -590,6 +830,10 @@ workflows: name: nightly_binary_linux_conda_py3.5_cu92 python_version: "3.5" cu_version: "cu92" + filters: + branches: + only: + - master wheel_docker_image: "soumith/manylinux-cuda92" - binary_conda_upload: name: nightly_binary_linux_conda_py3.5_cu92_upload @@ -600,6 +844,10 @@ workflows: name: nightly_binary_linux_conda_py3.5_cu100 python_version: "3.5" cu_version: "cu100" + filters: + branches: + only: + - master - binary_conda_upload: name: nightly_binary_linux_conda_py3.5_cu100_upload context: org-member @@ -609,6 +857,10 @@ workflows: name: nightly_binary_linux_conda_py3.6_cpu python_version: "3.6" cu_version: "cpu" + filters: + branches: + only: + - master - binary_conda_upload: name: nightly_binary_linux_conda_py3.6_cpu_upload context: org-member @@ -618,6 +870,10 @@ workflows: name: nightly_binary_linux_conda_py3.6_cu92 python_version: "3.6" cu_version: "cu92" + filters: + branches: + only: + - master wheel_docker_image: "soumith/manylinux-cuda92" - binary_conda_upload: name: nightly_binary_linux_conda_py3.6_cu92_upload @@ -628,6 +884,10 @@ workflows: name: nightly_binary_linux_conda_py3.6_cu100 python_version: "3.6" cu_version: "cu100" + filters: + branches: + only: + - master - binary_conda_upload: name: nightly_binary_linux_conda_py3.6_cu100_upload context: org-member @@ -637,6 +897,10 @@ workflows: name: nightly_binary_linux_conda_py3.7_cpu python_version: "3.7" cu_version: "cpu" + filters: + branches: + only: + - master - binary_conda_upload: name: nightly_binary_linux_conda_py3.7_cpu_upload context: org-member @@ -646,6 +910,10 @@ workflows: name: nightly_binary_linux_conda_py3.7_cu92 python_version: "3.7" cu_version: "cu92" + filters: + branches: + only: + - master wheel_docker_image: "soumith/manylinux-cuda92" - binary_conda_upload: name: nightly_binary_linux_conda_py3.7_cu92_upload @@ -656,6 +924,10 @@ workflows: name: nightly_binary_linux_conda_py3.7_cu100 python_version: "3.7" cu_version: "cu100" + filters: + branches: + only: + - master - binary_conda_upload: name: nightly_binary_linux_conda_py3.7_cu100_upload context: org-member @@ -665,6 +937,10 @@ workflows: name: nightly_binary_macos_conda_py2.7_cpu python_version: "2.7" cu_version: "cpu" + filters: + branches: + only: + - master - binary_conda_upload: name: nightly_binary_macos_conda_py2.7_cpu_upload context: org-member @@ -674,6 +950,10 @@ workflows: name: nightly_binary_macos_conda_py3.5_cpu python_version: "3.5" cu_version: "cpu" + filters: + branches: + only: + - master - binary_conda_upload: name: nightly_binary_macos_conda_py3.5_cpu_upload context: org-member @@ -683,6 +963,10 @@ workflows: name: nightly_binary_macos_conda_py3.6_cpu python_version: "3.6" cu_version: "cpu" + filters: + branches: + only: + - master - binary_conda_upload: name: nightly_binary_macos_conda_py3.6_cpu_upload context: org-member @@ -692,6 +976,10 @@ workflows: name: nightly_binary_macos_conda_py3.7_cpu python_version: "3.7" cu_version: "cpu" + filters: + branches: + only: + - master - binary_conda_upload: name: nightly_binary_macos_conda_py3.7_cpu_upload context: org-member diff --git a/.circleci/config.yml.in b/.circleci/config.yml.in index 91046fcd7b8..834cb7546fd 100644 --- a/.circleci/config.yml.in +++ b/.circleci/config.yml.in @@ -171,6 +171,10 @@ jobs: name: {{prefix}}binary_{{os}}_{{btype}}_py{{python_version}}{{ "u" if unicode }}_{{cu_version}} python_version: "{{python_version}}" cu_version: "{{cu_version}}" + filters: + branches: + only: + - master {%- if unicode %} unicode_abi: "1" {%- endif %} From 61745678e916b067f108a4b8f32903899de4c7fb Mon Sep 17 00:00:00 2001 From: Francisco Massa Date: Wed, 4 Sep 2019 11:16:46 +0200 Subject: [PATCH 3/7] Add initial CI --- .circleci/config.yml | 4 ++++ .circleci/config.yml.in | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4df468321d7..1a9665d0270 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -472,6 +472,10 @@ workflows: branches: only: - master + - binary_linux_conda: + name: torchvision_linux_py3.6_cpu + python_version: "3.6" + cu_version: "cpu" nightly: triggers: diff --git a/.circleci/config.yml.in b/.circleci/config.yml.in index 834cb7546fd..43ec2921ae8 100644 --- a/.circleci/config.yml.in +++ b/.circleci/config.yml.in @@ -218,6 +218,10 @@ workflows: jobs: - circleci_consistency {{ workflows() }} + - binary_linux_conda: + name: torchvision_linux_py3.6_cpu + python_version: "3.6" + cu_version: "cpu" nightly: triggers: From f13c67c2d74402c93926b1fdf7d52512339a7180 Mon Sep 17 00:00:00 2001 From: Francisco Massa Date: Wed, 4 Sep 2019 11:20:30 +0200 Subject: [PATCH 4/7] [wip] testing if works --- .circleci/config.yml | 6 +++--- .circleci/config.yml.in | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1a9665d0270..dea62dc60d5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -473,9 +473,9 @@ workflows: only: - master - binary_linux_conda: - name: torchvision_linux_py3.6_cpu - python_version: "3.6" - cu_version: "cpu" + name: torchvision_linux_py3.6_cpu + python_version: "3.6" + cu_version: "cpu" nightly: triggers: diff --git a/.circleci/config.yml.in b/.circleci/config.yml.in index 43ec2921ae8..e4db8609e67 100644 --- a/.circleci/config.yml.in +++ b/.circleci/config.yml.in @@ -219,9 +219,9 @@ workflows: - circleci_consistency {{ workflows() }} - binary_linux_conda: - name: torchvision_linux_py3.6_cpu - python_version: "3.6" - cu_version: "cpu" + name: torchvision_linux_py3.6_cpu + python_version: "3.6" + cu_version: "cpu" nightly: triggers: From 956893fc7d64bbdaa485d86f6a2281716dbe5040 Mon Sep 17 00:00:00 2001 From: Francisco Massa Date: Wed, 4 Sep 2019 13:30:33 +0200 Subject: [PATCH 5/7] Trying some basic GPU tests --- .circleci/config.yml | 30 ++++++++++++++++++++++++++++++ .circleci/config.yml.in | 30 ++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index dea62dc60d5..ef5c88c9b94 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -81,6 +81,32 @@ jobs: paths: - "*" + binary_linux_conda_cuda: + <<: *binary_common + machine: + image: ubuntu-1604:201903-01 + resource_class: gpu.medium + steps: + - checkout + - run: + name: Build + command: | + set -e + docker --version + # from https://github.com/NVIDIA/nvidia-docker#ubuntu-16041804-debian-jessiestretchbuster + # Add the package repositories + distribution=$(. /etc/os-release;echo $ID$VERSION_ID) + curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - + curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list + + sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit + sudo systemctl restart docker + + docker --version + # start + docker pull soumith/conda-cuda >/dev/null + + binary_macos_wheel: <<: *binary_common macos: @@ -476,6 +502,10 @@ workflows: name: torchvision_linux_py3.6_cpu python_version: "3.6" cu_version: "cpu" + - binary_linux_conda_cuda: + name: torchvision_linux_py3.6_cu100 + python_version: "3.6" + cu_version: "cu100" nightly: triggers: diff --git a/.circleci/config.yml.in b/.circleci/config.yml.in index e4db8609e67..9d4ba97244e 100644 --- a/.circleci/config.yml.in +++ b/.circleci/config.yml.in @@ -81,6 +81,32 @@ jobs: paths: - "*" + binary_linux_conda_cuda: + <<: *binary_common + machine: + image: ubuntu-1604:201903-01 + resource_class: gpu.medium + steps: + - checkout + - run: + name: Build + command: | + set -e + docker --version + # from https://github.com/NVIDIA/nvidia-docker#ubuntu-16041804-debian-jessiestretchbuster + # Add the package repositories + distribution=$(. /etc/os-release;echo $ID$VERSION_ID) + curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - + curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list + + sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit + sudo systemctl restart docker + + docker --version + # start + docker pull soumith/conda-cuda >/dev/null + + binary_macos_wheel: <<: *binary_common macos: @@ -222,6 +248,10 @@ workflows: name: torchvision_linux_py3.6_cpu python_version: "3.6" cu_version: "cpu" + - binary_linux_conda_cuda: + name: torchvision_linux_py3.6_cu100 + python_version: "3.6" + cu_version: "cu100" nightly: triggers: From 203a913676dd29aac7e33d5febecec0bb3628c35 Mon Sep 17 00:00:00 2001 From: Francisco Massa Date: Wed, 4 Sep 2019 17:07:25 +0200 Subject: [PATCH 6/7] [WIP] maybe it will work? --- .circleci/config.yml | 75 +++++++++++++++++++++++++++++++++++++---- .circleci/config.yml.in | 75 +++++++++++++++++++++++++++++++++++++---- 2 files changed, 136 insertions(+), 14 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ef5c88c9b94..e6cfbf1d4ba 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -92,8 +92,29 @@ jobs: name: Build command: | set -e - docker --version - # from https://github.com/NVIDIA/nvidia-docker#ubuntu-16041804-debian-jessiestretchbuster + + curl -L https://packagecloud.io/circleci/trusty/gpgkey | sudo apt-key add - + curl -L https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - + + sudo apt-get update + + sudo apt-get install \ + apt-transport-https \ + ca-certificates \ + curl \ + gnupg-agent \ + software-properties-common + + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - + + sudo add-apt-repository \ + "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ + $(lsb_release -cs) \ + stable" + + sudo apt-get update + sudo apt-get install docker-ce docker-ce-cli containerd.io + # Add the package repositories distribution=$(. /etc/os-release;echo $ID$VERSION_ID) curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - @@ -102,9 +123,49 @@ jobs: sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit sudo systemctl restart docker - docker --version - # start - docker pull soumith/conda-cuda >/dev/null + + DRIVER_FN="NVIDIA-Linux-x86_64-410.104.run" + wget "https://s3.amazonaws.com/ossci-linux/nvidia_driver/$DRIVER_FN" + sudo /bin/bash "$DRIVER_FN" -s --no-drm || (sudo cat /var/log/nvidia-installer.log && false) + nvidia-smi + + # export DOCKER_IMAGE=nvidia/cuda:10.0-base + export DOCKER_IMAGE=soumith/conda-cuda + docker pull $DOCKER_IMAGE >/dev/null + + export id=$(docker run --gpus all -t -d ${DOCKER_IMAGE}) + + docker cp /home/circleci/project/. $id:/workspace + + cat >/home/circleci/install_and_test.sh </dev/null + + DRIVER_FN="NVIDIA-Linux-x86_64-410.104.run" + wget "https://s3.amazonaws.com/ossci-linux/nvidia_driver/$DRIVER_FN" + sudo /bin/bash "$DRIVER_FN" -s --no-drm || (sudo cat /var/log/nvidia-installer.log && false) + nvidia-smi + + # export DOCKER_IMAGE=nvidia/cuda:10.0-base + export DOCKER_IMAGE=soumith/conda-cuda + docker pull $DOCKER_IMAGE >/dev/null + + export id=$(docker run --gpus all -t -d ${DOCKER_IMAGE}) + + docker cp /home/circleci/project/. $id:/workspace + + cat >/home/circleci/install_and_test.sh < Date: Wed, 4 Sep 2019 17:12:21 +0200 Subject: [PATCH 7/7] [WIP] One more try --- .circleci/config.yml | 2 +- .circleci/config.yml.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e6cfbf1d4ba..b1edadbd6e8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -137,7 +137,7 @@ jobs: docker cp /home/circleci/project/. $id:/workspace - cat >/home/circleci/install_and_test.sh </home/circleci/install_and_test.sh \</home/circleci/install_and_test.sh </home/circleci/install_and_test.sh \<