Skip to content

Commit

Permalink
ci: Remove mentions of conda-forge (#4082)
Browse files Browse the repository at this point in the history
(cherry picked from commit d391a0e)
Signed-off-by: Eli Uriegas <[email protected]>
  • Loading branch information
seemethere committed Jun 28, 2021
1 parent ae9963f commit 6e72416
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 38 deletions.
15 changes: 5 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,10 @@ jobs:
eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')"
conda activate base
conda install -yq conda-build "conda-package-handling!=1.5.0"
# cudatoolkit >= 11 isn't available for windows in the nvidia channel
if [[ "${CU_VERSION}" =~ cu11.* ]]; then
export CONDA_CHANNEL_FLAGS="-c conda-forge"
fi
packaging/build_conda.sh
rm /C/tools/miniconda3/conda-bld/win-64/vs${VC_YEAR}*.tar.bz2
- store_artifacts:
Expand Down Expand Up @@ -580,11 +584,7 @@ jobs:
set -x
eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')"
conda env remove -n python${PYTHON_VERSION} || true
CONDA_CHANNEL_FLAGS=""
if [[ "${PYTHON_VERSION}" = 3.9 ]]; then
CONDA_CHANNEL_FLAGS="-c=conda-forge"
fi
conda create ${CONDA_CHANNEL_FLAGS} -yn python${PYTHON_VERSION} python=${PYTHON_VERSION}
conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION}
conda activate python${PYTHON_VERSION}
conda install Pillow>=5.3.0
conda install -v -y -c pytorch-nightly pytorch
Expand All @@ -609,11 +609,6 @@ jobs:
command: |
set -x
eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')"
CONDA_CHANNEL_FLAGS=""
if [[ "${PYTHON_VERSION}" = 3.9 ]]; then
CONDA_CHANNEL_FLAGS="-c=conda-forge"
fi
conda create ${CONDA_CHANNEL_FLAGS} -yn python${PYTHON_VERSION} python=${PYTHON_VERSION}
conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION}
conda activate python${PYTHON_VERSION}
pip install $(ls ~/workspace/torchvision*.whl) --pre -f https://download.pytorch.org/whl/nightly/torch_nightly.html
Expand Down
15 changes: 5 additions & 10 deletions .circleci/config.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,10 @@ jobs:
eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')"
conda activate base
conda install -yq conda-build "conda-package-handling!=1.5.0"
# cudatoolkit >= 11 isn't available for windows in the nvidia channel
if [[ "${CU_VERSION}" =~ cu11.* ]]; then
export CONDA_CHANNEL_FLAGS="-c conda-forge"
fi
packaging/build_conda.sh
rm /C/tools/miniconda3/conda-bld/win-64/vs${VC_YEAR}*.tar.bz2
- store_artifacts:
Expand Down Expand Up @@ -580,11 +584,7 @@ jobs:
set -x
eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')"
conda env remove -n python${PYTHON_VERSION} || true
CONDA_CHANNEL_FLAGS=""
if [[ "${PYTHON_VERSION}" = 3.9 ]]; then
CONDA_CHANNEL_FLAGS="-c=conda-forge"
fi
conda create ${CONDA_CHANNEL_FLAGS} -yn python${PYTHON_VERSION} python=${PYTHON_VERSION}
conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION}
conda activate python${PYTHON_VERSION}
conda install Pillow>=5.3.0
conda install -v -y -c pytorch-nightly pytorch
Expand All @@ -609,11 +609,6 @@ jobs:
command: |
set -x
eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')"
CONDA_CHANNEL_FLAGS=""
if [[ "${PYTHON_VERSION}" = 3.9 ]]; then
CONDA_CHANNEL_FLAGS="-c=conda-forge"
fi
conda create ${CONDA_CHANNEL_FLAGS} -yn python${PYTHON_VERSION} python=${PYTHON_VERSION}
conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION}
conda activate python${PYTHON_VERSION}
pip install $(ls ~/workspace/torchvision*.whl) --pre -f https://download.pytorch.org/whl/nightly/torch_nightly.html
Expand Down
2 changes: 0 additions & 2 deletions .circleci/unittest/linux/scripts/environment.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
channels:
- pytorch
- defaults
# using conda-forge for python v3.9
- conda-forge
dependencies:
- pytest
- pytest-cov
Expand Down
2 changes: 1 addition & 1 deletion .circleci/unittest/linux/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ else
fi

printf "Installing PyTorch with %s\n" "${cudatoolkit}"
conda install -y -c "pytorch-${UPLOAD_CHANNEL}" -c conda-forge "pytorch-${UPLOAD_CHANNEL}"::pytorch "${cudatoolkit}" pytest
conda install -y -c "pytorch-${UPLOAD_CHANNEL}" "pytorch-${UPLOAD_CHANNEL}"::pytorch "${cudatoolkit}" pytest

if [ $PYTHON_VERSION == "3.6" ]; then
printf "Installing minimal PILLOW version\n"
Expand Down
2 changes: 0 additions & 2 deletions .circleci/unittest/windows/scripts/environment.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
channels:
- pytorch
- defaults
# use conda-forge for python v3.9+
- conda-forge
dependencies:
- pytest
- pytest-cov
Expand Down
2 changes: 1 addition & 1 deletion .circleci/unittest/windows/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ else
fi

printf "Installing PyTorch with %s\n" "${cudatoolkit}"
conda install -y -c "pytorch-${UPLOAD_CHANNEL}" -c conda-forge "pytorch-${UPLOAD_CHANNEL}"::pytorch "${cudatoolkit}" pytest
conda install -y -c "pytorch-${UPLOAD_CHANNEL}" "pytorch-${UPLOAD_CHANNEL}"::pytorch "${cudatoolkit}" pytest

if [ $PYTHON_VERSION == "3.6" ]; then
printf "Installing minimal PILLOW version\n"
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ clear and has sufficient instructions to be able to reproduce the issue.
### Install PyTorch Nightly

```bash
conda install pytorch -c pytorch-nightly -c conda-forge
conda install pytorch -c pytorch-nightly
# or with pip (see https://pytorch.org/get-started/locally/)
# pip install numpy
# pip install --pre torch -f https://download.pytorch.org/whl/nightly/cu102/torch_nightly.html
Expand Down
3 changes: 2 additions & 1 deletion packaging/build_conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ setup_conda_pytorch_constraint
setup_conda_cudatoolkit_constraint
setup_visual_studio_constraint
setup_junit_results_folder
conda build $CONDA_CHANNEL_FLAGS -c defaults -c conda-forge --no-anaconda-upload --python "$PYTHON_VERSION" packaging/torchvision
# nvidia channel included for cudatoolkit >= 11
conda build -c defaults -c nvidia $CONDA_CHANNEL_FLAGS --no-anaconda-upload --python "$PYTHON_VERSION" packaging/torchvision
12 changes: 3 additions & 9 deletions packaging/pkg_helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,10 @@ setup_wheel_python() {
if [[ "$(uname)" == Darwin || "$OSTYPE" == "msys" ]]; then
eval "$(conda shell.bash hook)"
conda env remove -n "env$PYTHON_VERSION" || true
if [[ "$PYTHON_VERSION" == 3.9 ]]; then
export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c=conda-forge"
fi
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} -c conda-forge libpng "jpeg<=9b" -y
conda install ${CONDA_CHANNEL_FLAGS} libpng "jpeg<=9b" -y
else
# Install native CentOS libJPEG, LAME, freetype and GnuTLS
yum install -y libjpeg-turbo-devel lame freetype gnutls
Expand Down Expand Up @@ -250,7 +247,7 @@ setup_pip_pytorch_version() {
# You MUST have populated PYTORCH_VERSION_SUFFIX before hand.
setup_conda_pytorch_constraint() {
if [[ -z "$PYTORCH_VERSION" ]]; then
export CONDA_CHANNEL_FLAGS="-c pytorch-nightly -c pytorch"
export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c pytorch-nightly -c pytorch"
export PYTORCH_VERSION="$(conda search --json 'pytorch[channel=pytorch-nightly]' | \
python -c "import os, sys, json, re; cuver = os.environ.get('CU_VERSION'); \
cuver_1 = cuver.replace('cu', 'cuda') if cuver != 'cpu' else cuver; \
Expand All @@ -265,7 +262,7 @@ setup_conda_pytorch_constraint() {
exit 1
fi
else
export CONDA_CHANNEL_FLAGS="-c pytorch -c pytorch-${UPLOAD_CHANNEL}"
export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c pytorch -c pytorch-${UPLOAD_CHANNEL}"
fi
if [[ "$CU_VERSION" == cpu ]]; then
export CONDA_PYTORCH_BUILD_CONSTRAINT="- pytorch==$PYTORCH_VERSION${PYTORCH_VERSION_SUFFIX}"
Expand All @@ -277,9 +274,6 @@ setup_conda_pytorch_constraint() {
if [[ "$OSTYPE" == msys && "$CU_VERSION" == cu92 ]]; then
export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c defaults -c numba/label/dev"
fi
if [[ "$PYTHON_VERSION" == 3.9 ]]; then
export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c=conda-forge"
fi
}

# Translate CUDA_VERSION into CUDA_CUDATOOLKIT_CONSTRAINT
Expand Down
1 change: 0 additions & 1 deletion packaging/torchvision/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ test:
requires:
- pytest
- scipy
- av
# NOTE: Pinned to fix issues with size_t on Windows
- jpeg <=9b
- ca-certificates
Expand Down

0 comments on commit 6e72416

Please sign in to comment.