From 73cf2ba1f45def17fc13f4d6a131d512aba6ac6c Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Wed, 4 May 2022 14:55:36 +0100 Subject: [PATCH 01/20] Use libjpeg-turbo instead of libjpeg --- .circleci/unittest/linux/scripts/environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/unittest/linux/scripts/environment.yml b/.circleci/unittest/linux/scripts/environment.yml index 3c8fd4d966c..bbb9a7e1b9b 100644 --- a/.circleci/unittest/linux/scripts/environment.yml +++ b/.circleci/unittest/linux/scripts/environment.yml @@ -7,7 +7,7 @@ dependencies: - pytest-mock - pip - libpng - - jpeg + - jpeg-turbo - ca-certificates - h5py - pip: From 8d83854e3c6d3e1ac6b35954e4424751d746eec4 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Wed, 4 May 2022 14:57:16 +0100 Subject: [PATCH 02/20] Unskip tests --- test/test_image.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/test_image.py b/test/test_image.py index e4358f6f1e1..f7cca672b18 100644 --- a/test/test_image.py +++ b/test/test_image.py @@ -478,8 +478,6 @@ def test_write_jpeg_reference(img_path, tmpdir): assert_equal(torch_bytes, pil_bytes) -# TODO: Remove the skip. See https://github.com/pytorch/vision/issues/5162. -@pytest.mark.skip("this test fails because PIL uses libjpeg-turbo") @pytest.mark.parametrize( "img_path", [pytest.param(jpeg_path, id=_get_safe_image_name(jpeg_path)) for jpeg_path in get_images(ENCODE_JPEG, ".jpg")], @@ -498,8 +496,6 @@ def test_encode_jpeg(img_path): assert_equal(encoded_jpeg_torch, encoded_jpeg_pil) -# TODO: Remove the skip. See https://github.com/pytorch/vision/issues/5162. -@pytest.mark.skip("this test fails because PIL uses libjpeg-turbo") @pytest.mark.parametrize( "img_path", [pytest.param(jpeg_path, id=_get_safe_image_name(jpeg_path)) for jpeg_path in get_images(ENCODE_JPEG, ".jpg")], From cdfaeca21bc3008c0c5a49506b185b3f9db1dde0 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Wed, 4 May 2022 15:27:31 +0100 Subject: [PATCH 03/20] Adding conda-forge to the list of channels to look for --- .circleci/unittest/linux/scripts/environment.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/unittest/linux/scripts/environment.yml b/.circleci/unittest/linux/scripts/environment.yml index bbb9a7e1b9b..7acfafb91bc 100644 --- a/.circleci/unittest/linux/scripts/environment.yml +++ b/.circleci/unittest/linux/scripts/environment.yml @@ -1,6 +1,7 @@ channels: - pytorch - defaults + - conda-forge dependencies: - pytest - pytest-cov From c48f86121da69e9d94941a1e7db1bf756f783964 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Wed, 4 May 2022 15:41:35 +0100 Subject: [PATCH 04/20] Wrong package name... --- .circleci/unittest/linux/scripts/environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/unittest/linux/scripts/environment.yml b/.circleci/unittest/linux/scripts/environment.yml index 7acfafb91bc..7ca1ed316e1 100644 --- a/.circleci/unittest/linux/scripts/environment.yml +++ b/.circleci/unittest/linux/scripts/environment.yml @@ -8,7 +8,7 @@ dependencies: - pytest-mock - pip - libpng - - jpeg-turbo + - libjpeg-turbo - ca-certificates - h5py - pip: From bc55700b95d8fc5ffd0f67a3b057df5f364c0681 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Wed, 4 May 2022 16:54:30 +0100 Subject: [PATCH 05/20] Also let Windows use libjpeg-turbo --- .circleci/unittest/windows/scripts/environment.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/unittest/windows/scripts/environment.yml b/.circleci/unittest/windows/scripts/environment.yml index b1377a67812..b520d3a06a3 100644 --- a/.circleci/unittest/windows/scripts/environment.yml +++ b/.circleci/unittest/windows/scripts/environment.yml @@ -1,13 +1,14 @@ channels: - pytorch - defaults + - conda-forge dependencies: - pytest - pytest-cov - pytest-mock - pip - libpng - - jpeg + - libjpeg-turbo - ca-certificates - hdf5 - setuptools == 58.0.4 From b8c091f07d11d3779320a585873f1f2fecec3bc0 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Wed, 4 May 2022 17:54:52 +0100 Subject: [PATCH 06/20] Set a stricter tolerance and remove unnecessary legacy tests --- test/test_image.py | 49 +++------------------------------------------- 1 file changed, 3 insertions(+), 46 deletions(-) diff --git a/test/test_image.py b/test/test_image.py index f7cca672b18..c644ffb266e 100644 --- a/test/test_image.py +++ b/test/test_image.py @@ -94,10 +94,10 @@ def test_decode_jpeg(img_path, pil_mode, mode): data = read_file(img_path) img_ljpeg = decode_image(data, mode=mode) - # Permit a small variation on pixel values to account for implementation - # differences between Pillow and LibJPEG. + # Permit a small variation on pixel values to account for differences + # between Pillow's libjpeg and ours. abs_mean_diff = (img_ljpeg.type(torch.float32) - img_pil).abs().mean().item() - assert abs_mean_diff < 2 + assert abs_mean_diff < 1 def test_decode_jpeg_errors(): @@ -409,49 +409,6 @@ def test_encode_jpeg_errors(): encode_jpeg(torch.empty((100, 100), dtype=torch.uint8)) -def _collect_if(cond): - # TODO: remove this once test_encode_jpeg_reference and test_write_jpeg_reference - # are removed - def _inner(test_func): - if cond: - return test_func - else: - return pytest.mark.dont_collect(test_func) - - return _inner - - -@_collect_if(cond=False) -@pytest.mark.parametrize( - "img_path", - [pytest.param(jpeg_path, id=_get_safe_image_name(jpeg_path)) for jpeg_path in get_images(ENCODE_JPEG, ".jpg")], -) -def test_encode_jpeg_reference(img_path): - # This test is *wrong*. - # It compares a torchvision-encoded jpeg with a PIL-encoded jpeg (the reference), but it - # starts encoding the torchvision version from an image that comes from - # decode_jpeg, which can yield different results from pil.decode (see - # test_decode... which uses a high tolerance). - # Instead, we should start encoding from the exact same decoded image, for a - # valid comparison. This is done in test_encode_jpeg, but unfortunately - # these more correct tests fail on windows (probably because of a difference - # in libjpeg) between torchvision and PIL. - # FIXME: make the correct tests pass on windows and remove this. - dirname = os.path.dirname(img_path) - filename, _ = os.path.splitext(os.path.basename(img_path)) - write_folder = os.path.join(dirname, "jpeg_write") - expected_file = os.path.join(write_folder, f"{filename}_pil.jpg") - img = decode_jpeg(read_file(img_path)) - - with open(expected_file, "rb") as f: - pil_bytes = f.read() - pil_bytes = torch.as_tensor(list(pil_bytes), dtype=torch.uint8) - for src_img in [img, img.contiguous()]: - # PIL sets jpeg quality to 75 by default - jpeg_bytes = encode_jpeg(src_img, quality=75) - assert_equal(jpeg_bytes, pil_bytes) - - @_collect_if(cond=False) @pytest.mark.parametrize( "img_path", From a9153542e492bd401d3ddb50185f07a4228fca75 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Wed, 4 May 2022 17:57:07 +0100 Subject: [PATCH 07/20] Forgot this one --- test/test_image.py | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/test/test_image.py b/test/test_image.py index c644ffb266e..5aab85076b0 100644 --- a/test/test_image.py +++ b/test/test_image.py @@ -409,32 +409,6 @@ def test_encode_jpeg_errors(): encode_jpeg(torch.empty((100, 100), dtype=torch.uint8)) -@_collect_if(cond=False) -@pytest.mark.parametrize( - "img_path", - [pytest.param(jpeg_path, id=_get_safe_image_name(jpeg_path)) for jpeg_path in get_images(ENCODE_JPEG, ".jpg")], -) -def test_write_jpeg_reference(img_path, tmpdir): - # FIXME: Remove this eventually, see test_encode_jpeg_reference - data = read_file(img_path) - img = decode_jpeg(data) - - basedir = os.path.dirname(img_path) - filename, _ = os.path.splitext(os.path.basename(img_path)) - torch_jpeg = os.path.join(tmpdir, f"{filename}_torch.jpg") - pil_jpeg = os.path.join(basedir, "jpeg_write", f"{filename}_pil.jpg") - - write_jpeg(img, torch_jpeg, quality=75) - - with open(torch_jpeg, "rb") as f: - torch_bytes = f.read() - - with open(pil_jpeg, "rb") as f: - pil_bytes = f.read() - - assert_equal(torch_bytes, pil_bytes) - - @pytest.mark.parametrize( "img_path", [pytest.param(jpeg_path, id=_get_safe_image_name(jpeg_path)) for jpeg_path in get_images(ENCODE_JPEG, ".jpg")], From 11e70ad31f2036152214c9b10e02ec0d596754bb Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Thu, 5 May 2022 11:40:24 +0100 Subject: [PATCH 08/20] Let packaging scripts use libjpeg-turbo instead of libjpeg --- packaging/build_cmake.sh | 3 ++- packaging/pkg_helpers.bash | 4 +++- packaging/torchvision/meta.yaml | 6 +++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packaging/build_cmake.sh b/packaging/build_cmake.sh index 17b62c55d82..6e442c292e9 100755 --- a/packaging/build_cmake.sh +++ b/packaging/build_cmake.sh @@ -46,7 +46,8 @@ conda install -yq \pytorch=$PYTORCH_VERSION $CONDA_CUDATOOLKIT_CONSTRAINT $PYTOR TORCH_PATH=$(dirname $(python -c "import torch; print(torch.__file__)")) if [[ "$(uname)" == Darwin || "$OSTYPE" == "msys" ]]; then - conda install -yq libpng jpeg + conda install -yq libpng + conda install -yq libjpeg-turbo -c conda-forge else yum install -y libpng-devel libjpeg-turbo-devel fi diff --git a/packaging/pkg_helpers.bash b/packaging/pkg_helpers.bash index 9da177dafaf..e1f17c37986 100644 --- a/packaging/pkg_helpers.bash +++ b/packaging/pkg_helpers.bash @@ -157,7 +157,9 @@ setup_wheel_python() { conda create ${CONDA_CHANNEL_FLAGS} -yn "env$PYTHON_VERSION" python="$PYTHON_VERSION" conda activate "env$PYTHON_VERSION" # Install libpng from Anaconda (defaults) - conda install ${CONDA_CHANNEL_FLAGS} libpng "jpeg<=9b" -y + conda install ${CONDA_CHANNEL_FLAGS} libpng -y + # Install libjpeg-turbo from conda-forge + conda install -c conda-forge libjpeg-turbo -y else # Install native CentOS libJPEG, freetype and GnuTLS yum install -y libjpeg-turbo-devel freetype gnutls diff --git a/packaging/torchvision/meta.yaml b/packaging/torchvision/meta.yaml index 2a6a46e84f9..8a38d461ed7 100644 --- a/packaging/torchvision/meta.yaml +++ b/packaging/torchvision/meta.yaml @@ -10,7 +10,7 @@ requirements: build: - {{ compiler('c') }} # [win] - libpng - - jpeg + - libjpeg-turbo # NOTE: The only ffmpeg version that we build is actually 4.2 - ffmpeg >=4.2 # [not win] @@ -27,7 +27,7 @@ requirements: - requests - libpng - ffmpeg >=4.2 # [not win] - - jpeg + - libjpeg-turbo - pillow >=5.3.0, !=8.3.* - pytorch-mutex 1.0 {{ build_variant }} # [not osx ] {{ environ.get('CONDA_PYTORCH_CONSTRAINT') }} @@ -60,7 +60,7 @@ test: requires: - pytest - scipy - - jpeg + - libjpeg-turbo - ca-certificates From 6108940812e0c3a3c2a04f862175c2f6943cefb5 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Thu, 5 May 2022 11:52:29 +0100 Subject: [PATCH 09/20] libjpeg.dll isn't found? --- packaging/build_wheel.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/build_wheel.sh b/packaging/build_wheel.sh index 193eb386d13..5e48ec5406f 100755 --- a/packaging/build_wheel.sh +++ b/packaging/build_wheel.sh @@ -22,7 +22,7 @@ if [[ "$(uname)" == Darwin || "$OSTYPE" == "msys" ]]; then pip_install "delocate>=0.9" else cp "$bin_path/Library/bin/libpng16.dll" torchvision - cp "$bin_path/Library/bin/libjpeg.dll" torchvision + # cp "$bin_path/Library/bin/libjpeg.dll" torchvision fi else # Install auditwheel to get some inspection utilities From f81da49f0de8c7a560729476df89b4f820623d4f Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Fri, 6 May 2022 10:27:56 +0100 Subject: [PATCH 10/20] Add conda-forge channel to conda build call --- packaging/build_conda.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/build_conda.sh b/packaging/build_conda.sh index 6c11853bf8d..7aaa4d2675c 100755 --- a/packaging/build_conda.sh +++ b/packaging/build_conda.sh @@ -18,4 +18,4 @@ if [[ "$CU_VERSION" == cu115 || "$CU_VERSION" == cu116 ]]; then export CUDATOOLKIT_CHANNEL="conda-forge" fi -conda build -c $CUDATOOLKIT_CHANNEL -c defaults $CONDA_CHANNEL_FLAGS --no-anaconda-upload --python "$PYTHON_VERSION" packaging/torchvision +conda build -c $CUDATOOLKIT_CHANNEL -c defaults $CONDA_CHANNEL_FLAGS -c conda-forge --no-anaconda-upload --python "$PYTHON_VERSION" packaging/torchvision From dbda81e5aaf548f934296aa02c2b2fc41d4318f5 Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Thu, 8 Sep 2022 10:34:21 +0100 Subject: [PATCH 11/20] M1 ??? --- .github/workflows/build-m1-binaries.yml | 2 +- .github/workflows/test-m1.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-m1-binaries.yml b/.github/workflows/build-m1-binaries.yml index b34dfd8f528..26c89156113 100644 --- a/.github/workflows/build-m1-binaries.yml +++ b/.github/workflows/build-m1-binaries.yml @@ -52,7 +52,7 @@ jobs: setup_build_version fi - conda create -yp ${ENV_NAME} python=${PY_VERS} numpy libpng jpeg wheel pkg-config + conda create -yp ${ENV_NAME} python=${PY_VERS} numpy libpng wheel pkg-config libjpeg-turbo -c conda-forge conda run -p ${ENV_NAME} python3 -mpip install torch --pre --extra-index-url=https://download.pytorch.org/whl/${CHANNEL} conda run -p ${ENV_NAME} python3 -mpip install delocate conda run -p ${ENV_NAME} python3 setup.py bdist_wheel diff --git a/.github/workflows/test-m1.yml b/.github/workflows/test-m1.yml index 1e5f79f82fd..a03eb9c8009 100644 --- a/.github/workflows/test-m1.yml +++ b/.github/workflows/test-m1.yml @@ -34,7 +34,7 @@ jobs: # Needed for JPEG library detection as setup.py detects conda presence by running `shutil.which('conda')` export PATH=~/miniconda3/bin:$PATH set -ex - conda create -yp ${ENV_NAME} python=${PY_VERS} numpy libpng jpeg scipy + conda create -yp ${ENV_NAME} python=${PY_VERS} numpy libpng scipy libjpeg-turbo -c conda-forge conda run -p ${ENV_NAME} python3 -mpip install --pre torch --extra-index-url=https://download.pytorch.org/whl/${CHANNEL} conda run -p ${ENV_NAME} python3 setup.py develop conda run -p ${ENV_NAME} python3 -mpip install pytest pytest-mock av From a8539175e9d7409de6bfa0b9899aef9c1a4ab9c5 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Fri, 9 Sep 2022 13:25:34 +0200 Subject: [PATCH 12/20] try use libmamba as solver --- packaging/build_conda.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/packaging/build_conda.sh b/packaging/build_conda.sh index db6b7b091e5..ea362aa0d23 100755 --- a/packaging/build_conda.sh +++ b/packaging/build_conda.sh @@ -12,5 +12,6 @@ setup_conda_cudatoolkit_constraint setup_visual_studio_constraint setup_junit_results_folder export CUDATOOLKIT_CHANNEL="nvidia" +export CONDA_EXPERIMENTAL_SOLVER="libmamba" conda build -c $CUDATOOLKIT_CHANNEL $CONDA_CHANNEL_FLAGS -c conda-forge --no-anaconda-upload --python "$PYTHON_VERSION" packaging/torchvision From 0dc1d5958f5d560346e32c6c8d18b4d71001e4f9 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Fri, 9 Sep 2022 13:31:10 +0200 Subject: [PATCH 13/20] install solver first --- packaging/build_conda.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packaging/build_conda.sh b/packaging/build_conda.sh index ea362aa0d23..0fb7a28f18b 100755 --- a/packaging/build_conda.sh +++ b/packaging/build_conda.sh @@ -12,6 +12,8 @@ setup_conda_cudatoolkit_constraint setup_visual_studio_constraint setup_junit_results_folder export CUDATOOLKIT_CHANNEL="nvidia" + +conda install conda-libmamba-solver export CONDA_EXPERIMENTAL_SOLVER="libmamba" conda build -c $CUDATOOLKIT_CHANNEL $CONDA_CHANNEL_FLAGS -c conda-forge --no-anaconda-upload --python "$PYTHON_VERSION" packaging/torchvision From e5fd3625cb5e3d0b9cb375cd4622f14eef53d933 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Fri, 9 Sep 2022 14:40:56 +0200 Subject: [PATCH 14/20] try pin cudatoolkit <0 for CUDA >= 11.6 --- packaging/torchvision/meta.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packaging/torchvision/meta.yaml b/packaging/torchvision/meta.yaml index 067927fd600..7ed23be986d 100644 --- a/packaging/torchvision/meta.yaml +++ b/packaging/torchvision/meta.yaml @@ -1,4 +1,6 @@ {% set build_variant = environ.get('CONDA_BUILD_VARIANT', 'cpu') %} +{% set cuda_version = int(environ.get('CU_VERSION', 'cpu').replace('cpu', 'cu-1')[2:]) %} + package: name: torchvision version: "{{ environ.get('BUILD_VERSION') }}" @@ -38,8 +40,10 @@ requirements: - cpuonly {% elif not osx %} run_constrained: - - cpuonly <0 - {% endif %} + - cpuonly <0 + { % elif cuda_version >= 116 % } + - cudatoolkit <0 + { % endif % } build: string: py{{py}}_{{ environ['CU_VERSION'] }} From e2a013a3a3392aa9588fa116efb146f75a4b9806 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Fri, 9 Sep 2022 14:54:25 +0200 Subject: [PATCH 15/20] fix syntax --- packaging/torchvision/meta.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packaging/torchvision/meta.yaml b/packaging/torchvision/meta.yaml index 7ed23be986d..46d5fd8c53f 100644 --- a/packaging/torchvision/meta.yaml +++ b/packaging/torchvision/meta.yaml @@ -41,9 +41,10 @@ requirements: {% elif not osx %} run_constrained: - cpuonly <0 - { % elif cuda_version >= 116 % } - - cudatoolkit <0 + { % if cuda_version >= 116 % } + - cudatoolkit <0 { % endif % } + { % endif % } build: string: py{{py}}_{{ environ['CU_VERSION'] }} From 42e42ea2bc39fc6b0b51b72ba3c9546b65f20872 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Fri, 9 Sep 2022 15:07:10 +0200 Subject: [PATCH 16/20] another try --- packaging/torchvision/meta.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packaging/torchvision/meta.yaml b/packaging/torchvision/meta.yaml index 46d5fd8c53f..e98e62d7490 100644 --- a/packaging/torchvision/meta.yaml +++ b/packaging/torchvision/meta.yaml @@ -41,10 +41,10 @@ requirements: {% elif not osx %} run_constrained: - cpuonly <0 - { % if cuda_version >= 116 % } + {% if cuda_version >= 116 %} - cudatoolkit <0 - { % endif % } - { % endif % } + {% endif %} + {% endif %} build: string: py{{py}}_{{ environ['CU_VERSION'] }} From ddfa3198f1569ef6c3ec819dbe1e5486637f992e Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Fri, 9 Sep 2022 15:24:13 +0200 Subject: [PATCH 17/20] and another --- packaging/torchvision/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/torchvision/meta.yaml b/packaging/torchvision/meta.yaml index e98e62d7490..e4d265326cb 100644 --- a/packaging/torchvision/meta.yaml +++ b/packaging/torchvision/meta.yaml @@ -1,5 +1,5 @@ {% set build_variant = environ.get('CONDA_BUILD_VARIANT', 'cpu') %} -{% set cuda_version = int(environ.get('CU_VERSION', 'cpu').replace('cpu', 'cu-1')[2:]) %} +{% set cuda_version = environ.get('CU_VERSION', 'cpu').replace('cpu', 'cu-1')[2:] | int %} package: name: torchvision From 605024c048a88dbf8e52969f639bc0db4dd13ae9 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Fri, 9 Sep 2022 15:42:15 +0200 Subject: [PATCH 18/20] add debug echo --- packaging/build_conda.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packaging/build_conda.sh b/packaging/build_conda.sh index 0fb7a28f18b..dd4bcf7a05a 100755 --- a/packaging/build_conda.sh +++ b/packaging/build_conda.sh @@ -16,4 +16,6 @@ export CUDATOOLKIT_CHANNEL="nvidia" conda install conda-libmamba-solver export CONDA_EXPERIMENTAL_SOLVER="libmamba" -conda build -c $CUDATOOLKIT_CHANNEL $CONDA_CHANNEL_FLAGS -c conda-forge --no-anaconda-upload --python "$PYTHON_VERSION" packaging/torchvision +echo $CU_VERSION + +# conda build -c $CUDATOOLKIT_CHANNEL $CONDA_CHANNEL_FLAGS -c conda-forge --no-anaconda-upload --python "$PYTHON_VERSION" packaging/torchvision From 1e0b77fffdc80e83500785d4f6b345ef3fce1830 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Fri, 9 Sep 2022 15:56:10 +0200 Subject: [PATCH 19/20] reverse logic --- packaging/torchvision/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/torchvision/meta.yaml b/packaging/torchvision/meta.yaml index e4d265326cb..6376abad46d 100644 --- a/packaging/torchvision/meta.yaml +++ b/packaging/torchvision/meta.yaml @@ -41,7 +41,7 @@ requirements: {% elif not osx %} run_constrained: - cpuonly <0 - {% if cuda_version >= 116 %} + {% if cuda_version < 116 %} - cudatoolkit <0 {% endif %} {% endif %} From 2cccd772196c341aa98c395f13b503bd14d06ca1 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Fri, 9 Sep 2022 15:58:03 +0200 Subject: [PATCH 20/20] Revert "add debug echo" This reverts commit 605024c048a88dbf8e52969f639bc0db4dd13ae9. --- packaging/build_conda.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packaging/build_conda.sh b/packaging/build_conda.sh index dd4bcf7a05a..0fb7a28f18b 100755 --- a/packaging/build_conda.sh +++ b/packaging/build_conda.sh @@ -16,6 +16,4 @@ export CUDATOOLKIT_CHANNEL="nvidia" conda install conda-libmamba-solver export CONDA_EXPERIMENTAL_SOLVER="libmamba" -echo $CU_VERSION - -# conda build -c $CUDATOOLKIT_CHANNEL $CONDA_CHANNEL_FLAGS -c conda-forge --no-anaconda-upload --python "$PYTHON_VERSION" packaging/torchvision +conda build -c $CUDATOOLKIT_CHANNEL $CONDA_CHANNEL_FLAGS -c conda-forge --no-anaconda-upload --python "$PYTHON_VERSION" packaging/torchvision