Skip to content

Commit

Permalink
Fix anaconda path in conda environment on GH ephemeral runner (#4891)
Browse files Browse the repository at this point in the history
I tested #4886 with vision
nightly and found out that I need to set the path to anaconda on GH
ephemeral runner used by the upload job.
It would fail otherwise, i.e.
https://github.com/pytorch/vision/actions/runs/7550404642/job/20556529100#step:7:121

### Testing


https://github.com/pytorch/test-infra/actions/runs/7550720719/job/20557072841?pr=4891#step:7:117
shows that conda can find anaconda client version correctly.
  • Loading branch information
huydhn authored Jan 17, 2024
1 parent e602129 commit fac06ed
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/_binary_conda_upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,11 @@ jobs:
# shellcheck disable=SC1090
source "${BUILD_ENV_FILE}"
conda install --yes --quiet anaconda-client
conda run --no-capture-output anaconda --version
if [[ "${NIGHTLY_OR_TEST:-0}" == "1" ]]; then
for pkg in distr/**/*.tar.bz2; do
anaconda \
conda run --no-capture-output anaconda \
-t "${CONDA_TOKEN}" \
upload "${pkg}" \
-u "pytorch-${CHANNEL}" \
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test_build_conda_linux_with_cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- .github/workflows/test_build_conda_linux.yml
- .github/workflows/build_conda_linux.yml
- .github/workflows/generate_binary_build_matrix.yml
- .github/workflows/_binary_conda_upload.yml
- tools/scripts/generate_binary_build_matrix.py
workflow_dispatch:

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test_build_conda_linux_without_cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- .github/workflows/test_build_conda_linux.yml
- .github/workflows/build_conda_linux.yml
- .github/workflows/generate_binary_build_matrix.yml
- .github/workflows/_binary_conda_upload.yml
- tools/scripts/generate_binary_build_matrix.py
workflow_dispatch:

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test_build_conda_m1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- .github/workflows/test_build_conda_m1.yml
- .github/workflows/build_conda_macos.yml
- .github/workflows/generate_binary_build_matrix.yml
- .github/workflows/_binary_conda_upload.yml
- tools/scripts/generate_binary_build_matrix.py
workflow_dispatch:

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test_build_conda_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- .github/workflows/test_build_conda_macos.yml
- .github/workflows/build_conda_macos.yml
- .github/workflows/generate_binary_build_matrix.yml
- .github/workflows/_binary_conda_upload.yml
- tools/scripts/generate_binary_build_matrix.py

jobs:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test_build_conda_windows_with_cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- .github/workflows/test_build_conda_windows_with_cuda.yml
- .github/workflows/build_conda_windows.yml
- .github/workflows/generate_binary_build_matrix.yml
- .github/workflows/_binary_conda_upload.yml
- tools/scripts/generate_binary_build_matrix.py
workflow_dispatch:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- .github/workflows/test_build_conda_windows_without_cuda.yml
- .github/workflows/build_conda_windows.yml
- .github/workflows/generate_binary_build_matrix.yml
- .github/workflows/_binary_conda_upload.yml
- tools/scripts/generate_binary_build_matrix.py
workflow_dispatch:

Expand Down

0 comments on commit fac06ed

Please sign in to comment.