Skip to content

Commit 6243287

Browse files
committed
revert to local conda install
1 parent 7b7aa3c commit 6243287

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

.github/workflows/test-linux-cpu.yml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,33 +26,32 @@ jobs:
2626
if: ${{ (github.event_name == 'pull_request' && startsWith(github.base_ref, 'release')) || startsWith(github.ref, 'refs/heads/release') }}
2727
run: |
2828
echo "CHANNEL=test" >> "$GITHUB_ENV"
29-
- name: Setup miniconda
30-
uses: pytorch/test-infra/.github/actions/setup-miniconda@main
29+
- name: Setup Conda
30+
shell: bash -l {0}
3131
env:
32+
ENV_NAME: conda-env-${{ github.run_id }}
3233
PY_VERS: ${{ matrix.py_vers }}
33-
with:
34-
python_version: ${PY_VERS}
34+
run: |
35+
git config --global --add safe.directory /__w/vision/vision
36+
. ~/miniconda3/etc/profile.d/conda.sh
37+
conda create -yp ${ENV_NAME} python=${PY_VERS} numpy libpng jpeg scipy
38+
echo "CONDA_RUN=conda run -p ${ENV_NAME}" >> "$GITHUB_ENV"
3539
- name: Install TorchVision
3640
shell: bash -l {0}
3741
env:
38-
ENV_NAME: conda-env-${{ github.run_id }}
39-
PY_VERS: ${{ matrix.py_vers }}
4042
VERSION: cpu
4143
CUDATOOLKIT: cpuonly
4244
run: |
43-
# . ~/miniconda3/etc/profile.d/conda.sh
4445
# Needed for JPEG library detection as setup.py detects conda presence by running `shutil.which('conda')`
45-
# export PATH=~/miniconda3/bin:$PATH
46+
export PATH=~/miniconda3/bin:$PATH
4647
set -ex
47-
# conda create -yp ${ENV_NAME} python=${PY_VERS} numpy libpng jpeg scipy
48-
# conda run -p ${ENV_NAME} conda install -y -c "pytorch-${CHANNEL}" -c nvidia "pytorch-${CHANNEL}"::pytorch[build="*${VERSION}*"] "${CUDATOOLKIT}"
49-
# conda run -p ${ENV_NAME} python3 setup.py develop
50-
# conda run -p ${ENV_NAME} python3 -mpip install pytest pytest-mock av
51-
${CONDA_RUN} conda install -y numpy libpng jpeg scipy
52-
${CONDA_RUN} conda install -y -c "pytorch-${CHANNEL}" -c nvidia "pytorch-${CHANNEL}"::pytorch[build="*${VERSION}*"] "${CUDATOOLKIT}"
53-
git config --global --add safe.directory /__w/vision/vision
48+
${CONDA_RUN} conda install \
49+
--yes \
50+
-c "pytorch-${CHANNEL}" \
51+
-c nvidia "pytorch-${CHANNEL}"::pytorch[build="*${VERSION}*"] \
52+
"${CUDATOOLKIT}"
5453
${CONDA_RUN} python3 setup.py develop
55-
${CONDA_RUN} python3 -mpip install pytest pytest-mock av
54+
${CONDA_RUN} python3 -m pip install pytest pytest-mock av
5655
- name: Run tests
5756
shell: bash -l {0}
5857
env:

0 commit comments

Comments
 (0)