From 4a8eb56fb50c5c85fec30cc004e5b39e91da560b Mon Sep 17 00:00:00 2001 From: Scott Schneider Date: Wed, 9 Oct 2024 19:03:17 -0700 Subject: [PATCH] Set Python3 root. --- .github/workflows/macos_wheel.yaml | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos_wheel.yaml b/.github/workflows/macos_wheel.yaml index c1e5492c..559f4aba 100644 --- a/.github/workflows/macos_wheel.yaml +++ b/.github/workflows/macos_wheel.yaml @@ -73,12 +73,22 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Update pip - run: python3 -m pip install --upgrade pip + run: | + export PATH=${CONDA_ENV}/bin:${CONDA_ENV}:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH + export Python3_ROOT_DIR=${CONDA_ENV} + + python3 -m pip install --upgrade pip - name: Install PyTorch run: | + export PATH=${CONDA_ENV}/bin:${CONDA_ENV}:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH + export Python3_ROOT_DIR=${CONDA_ENV} + python3 -m pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu - name: Install torchcodec from the wheel run: | + export PATH=${CONDA_ENV}/bin:${CONDA_ENV}:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH + export Python3_ROOT_DIR=${CONDA_ENV} + wheel_path=`find pytorch/torchcodec/dist -type f -name "*.whl"` echo Installing $wheel_path python3 -m pip install $wheel_path -vvv @@ -92,13 +102,18 @@ jobs: # want to checkout the repo before installing the wheel to avoid any # side-effect. It's OK. source packaging/helpers.sh - assert_ffmpeg_not_installed + + # below was failing, but when I just try to call "ffmpeg -version" that also fails? + #assert_ffmpeg_not_installed conda install "ffmpeg=${{ matrix.ffmpeg-version-for-tests }}" -c conda-forge ffmpeg -version - name: Install test dependencies run: | + export PATH=${CONDA_ENV}/bin:${CONDA_ENV}:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH + export Python3_ROOT_DIR=${CONDA_ENV} + python3 -m pip install --pre torchvision --index-url https://download.pytorch.org/whl/nightly/cpu # Ideally we would find a way to get those dependencies from pyproject.toml python3 -m pip install numpy pytest pillow @@ -119,7 +134,13 @@ jobs: ls - name: Smoke test run: | + export PATH=${CONDA_ENV}/bin:${CONDA_ENV}:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH + export Python3_ROOT_DIR=${CONDA_ENV} + python3 test/decoders/manual_smoke_test.py - name: Run Python tests run: | + export PATH=${CONDA_ENV}/bin:${CONDA_ENV}:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH + export Python3_ROOT_DIR=${CONDA_ENV} + pytest test