Skip to content

Commit 402e91d

Browse files
committed
[M1] Install "jpeg<=9b" rather than OpenJpeg
1 parent 59ef2ab commit 402e91d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/build-m1-binaries.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ jobs:
2424
PY_VERS: ${{ matrix.py_vers }}
2525
run: |
2626
. ~/miniconda3/etc/profile.d/conda.sh
27+
export PATH=~/miniconda3/bin:$PATH
2728
set -ex
2829
. packaging/pkg_helpers.bash
2930
setup_build_version
3031
WHL_NAME=torchvision-${BUILD_VERSION}-cp${PY_VERS/.}-cp${PY_VERS/.}-macosx_11_0_arm64.whl
31-
conda create -yp ${ENV_NAME} python=${PY_VERS} numpy libpng openjpeg wheel pkg-config
32+
conda create -yp ${ENV_NAME} python=${PY_VERS} numpy libpng "jpeg<=9b" wheel pkg-config
3233
conda run -p ${ENV_NAME} python3 -mpip install torch --pre --extra-index-url=https://download.pytorch.org/whl/nightly
3334
conda run -p ${ENV_NAME} python3 -mpip install delocate
3435
conda run -p ${ENV_NAME} python3 setup.py bdist_wheel
@@ -49,6 +50,7 @@ jobs:
4950
# Test torch is importable, by changing cwd and running import commands
5051
conda run --cwd /tmp -p ${ENV_NAME} python3 -c "import torchvision;print('torchvision version is ', torchvision.__version__)"
5152
conda run --cwd /tmp -p ${ENV_NAME} python3 -c "import torch;import torchvision;print('Is torchvision useable?', all(x is not None for x in [torch.ops.image.decode_png, torch.ops.torchvision.roi_align]))"
53+
conda run --cwd /tmp -p ${ENV_NAME} python3 -c "import torchvision;print(torchvision.io.read_image('${PWD}/gallery/assets/dog1.jpg').shape)"
5254
conda env remove -p ${ENV_NAME}
5355
- name: Upload wheel to GitHub
5456
uses: actions/upload-artifact@v3

0 commit comments

Comments
 (0)