Skip to content

Commit 3d103d1

Browse files
authored
Update unittest and packaging to use UPLOAD_CHANNEL (#2846)
1 parent 82acfef commit 3d103d1

File tree

6 files changed

+53
-12
lines changed

6 files changed

+53
-12
lines changed

.circleci/config.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ jobs:
134134
resource_class: 2xlarge+
135135
steps:
136136
- checkout_merge
137+
- designate_upload_channel
137138
- run: packaging/build_wheel.sh
138139
- store_artifacts:
139140
path: dist
@@ -149,6 +150,7 @@ jobs:
149150
resource_class: 2xlarge+
150151
steps:
151152
- checkout_merge
153+
- designate_upload_channel
152154
- run: packaging/build_conda.sh
153155
- store_artifacts:
154156
path: /opt/conda/conda-bld/linux-64
@@ -164,6 +166,7 @@ jobs:
164166
executor: windows-cpu
165167
steps:
166168
- checkout_merge
169+
- designate_upload_channel
167170
- run:
168171
name: Build conda packages
169172
command: |
@@ -189,6 +192,7 @@ jobs:
189192
executor: windows-cpu
190193
steps:
191194
- checkout_merge
195+
- designate_upload_channel
192196
- run:
193197
name: Build wheel packages
194198
command: |
@@ -211,6 +215,7 @@ jobs:
211215
xcode: "9.4.1"
212216
steps:
213217
- checkout_merge
218+
- designate_upload_channel
214219
- run:
215220
# Cannot easily deduplicate this as source'ing activate
216221
# will set environment variables which we need to propagate
@@ -233,6 +238,7 @@ jobs:
233238
xcode: "9.4.1"
234239
steps:
235240
- checkout_merge
241+
- designate_upload_channel
236242
- run:
237243
command: |
238244
curl -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
@@ -295,6 +301,7 @@ jobs:
295301
steps:
296302
- attach_workspace:
297303
at: ~/workspace
304+
- designate_upload_channel
298305
- run:
299306
name: install binaries
300307
command: |
@@ -313,6 +320,7 @@ jobs:
313320
steps:
314321
- attach_workspace:
315322
at: ~/workspace
323+
- designate_upload_channel
316324
- run:
317325
name: install binaries
318326
command: |
@@ -333,6 +341,7 @@ jobs:
333341
image_name: torchvision/smoke_test
334342
steps:
335343
- checkout
344+
- designate_upload_channel
336345
- run:
337346
name: Build and push Docker image
338347
no_output_timeout: "1h"
@@ -352,6 +361,7 @@ jobs:
352361
steps:
353362
- attach_workspace:
354363
at: ~/workspace
364+
- designate_upload_channel
355365
- run:
356366
name: install binaries
357367
command: |
@@ -377,6 +387,7 @@ jobs:
377387
steps:
378388
- attach_workspace:
379389
at: ~/workspace
390+
- designate_upload_channel
380391
- run:
381392
name: install binaries
382393
command: |
@@ -400,6 +411,7 @@ jobs:
400411
resource_class: 2xlarge+
401412
steps:
402413
- checkout
414+
- designate_upload_channel
403415
- run:
404416
name: Generate cache key
405417
# This will refresh cache on Sundays, nightly build should generate new cache.
@@ -440,6 +452,7 @@ jobs:
440452
image_name: "pytorch/manylinux-cuda101"
441453
steps:
442454
- checkout
455+
- designate_upload_channel
443456
- run:
444457
name: Generate cache key
445458
# This will refresh cache on Sundays, nightly build should generate new cache.
@@ -461,7 +474,7 @@ jobs:
461474
- env
462475
- run:
463476
name: Install torchvision
464-
command: docker run -t --gpus all -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/install.sh
477+
command: docker run -t --gpus all -v $PWD:$PWD -w $PWD -e UPLOAD_CHANNEL "${image_name}" .circleci/unittest/linux/scripts/install.sh
465478
- run:
466479
name: Run tests
467480
command: docker run -t --gpus all -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/run_test.sh
@@ -477,6 +490,7 @@ jobs:
477490
name: windows-cpu
478491
steps:
479492
- checkout
493+
- designate_upload_channel
480494
- run:
481495
name: Generate cache key
482496
# This will refresh cache on Sundays, nightly build should generate new cache.
@@ -516,6 +530,7 @@ jobs:
516530
CUDA_VERSION: "10.1"
517531
steps:
518532
- checkout
533+
- designate_upload_channel
519534
- run:
520535
name: Generate cache key
521536
# This will refresh cache on Sundays, nightly build should generate new cache.
@@ -554,6 +569,7 @@ jobs:
554569
resource_class: large
555570
steps:
556571
- checkout
572+
- designate_upload_channel
557573
- run:
558574
name: Install wget
559575
command: HOMEBREW_NO_AUTO_UPDATE=1 brew install wget
@@ -596,6 +612,7 @@ jobs:
596612
resource_class: 2xlarge+
597613
steps:
598614
- checkout_merge
615+
- designate_upload_channel
599616
- run:
600617
name: Setup conda
601618
command: .circleci/unittest/linux/scripts/setup_env.sh
@@ -613,19 +630,21 @@ jobs:
613630
CU_VERSION: << parameters.cu_version >>
614631
steps:
615632
- checkout_merge
633+
- designate_upload_channel
616634
- run:
617635
name: Setup conda
618636
command: docker run -e CU_VERSION -e PYTHON_VERSION -e UNICODE_ABI -e PYTORCH_VERSION -t --gpus all -v $PWD:$PWD -w $PWD << parameters.wheel_docker_image >> .circleci/unittest/linux/scripts/setup_env.sh
619637
- run:
620638
name: Build torchvision C++ distribution and test
621-
command: docker run -e CU_VERSION -e PYTHON_VERSION -e UNICODE_ABI -e PYTORCH_VERSION -t --gpus all -v $PWD:$PWD -w $PWD << parameters.wheel_docker_image >> packaging/build_cmake.sh
639+
command: docker run -e CU_VERSION -e PYTHON_VERSION -e UNICODE_ABI -e PYTORCH_VERSION -e UPLOAD_CHANNEL -t --gpus all -v $PWD:$PWD -w $PWD << parameters.wheel_docker_image >> packaging/build_cmake.sh
622640

623641
cmake_macos_cpu:
624642
<<: *binary_common
625643
macos:
626644
xcode: "9.0"
627645
steps:
628646
- checkout_merge
647+
- designate_upload_channel
629648
- run:
630649
command: |
631650
curl -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
@@ -640,6 +659,7 @@ jobs:
640659
name: windows-cpu
641660
steps:
642661
- checkout_merge
662+
- designate_upload_channel
643663
- run:
644664
command: |
645665
set -ex
@@ -652,6 +672,7 @@ jobs:
652672
name: windows-gpu
653673
steps:
654674
- checkout_merge
675+
- designate_upload_channel
655676
- run:
656677
command: |
657678
set -ex

.circleci/config.yml.in

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ jobs:
134134
resource_class: 2xlarge+
135135
steps:
136136
- checkout_merge
137+
- designate_upload_channel
137138
- run: packaging/build_wheel.sh
138139
- store_artifacts:
139140
path: dist
@@ -149,6 +150,7 @@ jobs:
149150
resource_class: 2xlarge+
150151
steps:
151152
- checkout_merge
153+
- designate_upload_channel
152154
- run: packaging/build_conda.sh
153155
- store_artifacts:
154156
path: /opt/conda/conda-bld/linux-64
@@ -164,6 +166,7 @@ jobs:
164166
executor: windows-cpu
165167
steps:
166168
- checkout_merge
169+
- designate_upload_channel
167170
- run:
168171
name: Build conda packages
169172
command: |
@@ -189,6 +192,7 @@ jobs:
189192
executor: windows-cpu
190193
steps:
191194
- checkout_merge
195+
- designate_upload_channel
192196
- run:
193197
name: Build wheel packages
194198
command: |
@@ -211,6 +215,7 @@ jobs:
211215
xcode: "9.4.1"
212216
steps:
213217
- checkout_merge
218+
- designate_upload_channel
214219
- run:
215220
# Cannot easily deduplicate this as source'ing activate
216221
# will set environment variables which we need to propagate
@@ -233,6 +238,7 @@ jobs:
233238
xcode: "9.4.1"
234239
steps:
235240
- checkout_merge
241+
- designate_upload_channel
236242
- run:
237243
command: |
238244
curl -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
@@ -295,6 +301,7 @@ jobs:
295301
steps:
296302
- attach_workspace:
297303
at: ~/workspace
304+
- designate_upload_channel
298305
- run:
299306
name: install binaries
300307
command: |
@@ -313,6 +320,7 @@ jobs:
313320
steps:
314321
- attach_workspace:
315322
at: ~/workspace
323+
- designate_upload_channel
316324
- run:
317325
name: install binaries
318326
command: |
@@ -333,6 +341,7 @@ jobs:
333341
image_name: torchvision/smoke_test
334342
steps:
335343
- checkout
344+
- designate_upload_channel
336345
- run:
337346
name: Build and push Docker image
338347
no_output_timeout: "1h"
@@ -352,6 +361,7 @@ jobs:
352361
steps:
353362
- attach_workspace:
354363
at: ~/workspace
364+
- designate_upload_channel
355365
- run:
356366
name: install binaries
357367
command: |
@@ -377,6 +387,7 @@ jobs:
377387
steps:
378388
- attach_workspace:
379389
at: ~/workspace
390+
- designate_upload_channel
380391
- run:
381392
name: install binaries
382393
command: |
@@ -400,6 +411,7 @@ jobs:
400411
resource_class: 2xlarge+
401412
steps:
402413
- checkout
414+
- designate_upload_channel
403415
- run:
404416
name: Generate cache key
405417
# This will refresh cache on Sundays, nightly build should generate new cache.
@@ -440,6 +452,7 @@ jobs:
440452
image_name: "pytorch/manylinux-cuda101"
441453
steps:
442454
- checkout
455+
- designate_upload_channel
443456
- run:
444457
name: Generate cache key
445458
# This will refresh cache on Sundays, nightly build should generate new cache.
@@ -461,7 +474,7 @@ jobs:
461474
- env
462475
- run:
463476
name: Install torchvision
464-
command: docker run -t --gpus all -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/install.sh
477+
command: docker run -t --gpus all -v $PWD:$PWD -w $PWD -e UPLOAD_CHANNEL "${image_name}" .circleci/unittest/linux/scripts/install.sh
465478
- run:
466479
name: Run tests
467480
command: docker run -t --gpus all -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/run_test.sh
@@ -477,6 +490,7 @@ jobs:
477490
name: windows-cpu
478491
steps:
479492
- checkout
493+
- designate_upload_channel
480494
- run:
481495
name: Generate cache key
482496
# This will refresh cache on Sundays, nightly build should generate new cache.
@@ -516,6 +530,7 @@ jobs:
516530
CUDA_VERSION: "10.1"
517531
steps:
518532
- checkout
533+
- designate_upload_channel
519534
- run:
520535
name: Generate cache key
521536
# This will refresh cache on Sundays, nightly build should generate new cache.
@@ -554,6 +569,7 @@ jobs:
554569
resource_class: large
555570
steps:
556571
- checkout
572+
- designate_upload_channel
557573
- run:
558574
name: Install wget
559575
command: HOMEBREW_NO_AUTO_UPDATE=1 brew install wget
@@ -596,6 +612,7 @@ jobs:
596612
resource_class: 2xlarge+
597613
steps:
598614
- checkout_merge
615+
- designate_upload_channel
599616
- run:
600617
name: Setup conda
601618
command: .circleci/unittest/linux/scripts/setup_env.sh
@@ -613,19 +630,21 @@ jobs:
613630
CU_VERSION: << parameters.cu_version >>
614631
steps:
615632
- checkout_merge
633+
- designate_upload_channel
616634
- run:
617635
name: Setup conda
618636
command: docker run -e CU_VERSION -e PYTHON_VERSION -e UNICODE_ABI -e PYTORCH_VERSION -t --gpus all -v $PWD:$PWD -w $PWD << parameters.wheel_docker_image >> .circleci/unittest/linux/scripts/setup_env.sh
619637
- run:
620638
name: Build torchvision C++ distribution and test
621-
command: docker run -e CU_VERSION -e PYTHON_VERSION -e UNICODE_ABI -e PYTORCH_VERSION -t --gpus all -v $PWD:$PWD -w $PWD << parameters.wheel_docker_image >> packaging/build_cmake.sh
639+
command: docker run -e CU_VERSION -e PYTHON_VERSION -e UNICODE_ABI -e PYTORCH_VERSION -e UPLOAD_CHANNEL -t --gpus all -v $PWD:$PWD -w $PWD << parameters.wheel_docker_image >> packaging/build_cmake.sh
622640

623641
cmake_macos_cpu:
624642
<<: *binary_common
625643
macos:
626644
xcode: "9.0"
627645
steps:
628646
- checkout_merge
647+
- designate_upload_channel
629648
- run:
630649
command: |
631650
curl -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
@@ -640,6 +659,7 @@ jobs:
640659
name: windows-cpu
641660
steps:
642661
- checkout_merge
662+
- designate_upload_channel
643663
- run:
644664
command: |
645665
set -ex
@@ -652,6 +672,7 @@ jobs:
652672
name: windows-gpu
653673
steps:
654674
- checkout_merge
675+
- designate_upload_channel
655676
- run:
656677
command: |
657678
set -ex

.circleci/unittest/linux/scripts/install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ else
2323
cudatoolkit="cudatoolkit=${version}"
2424
fi
2525
printf "Installing PyTorch with %s\n" "${cudatoolkit}"
26-
conda install -y -c pytorch-nightly pytorch "${cudatoolkit}"
26+
conda install -y -c "pytorch-${UPLOAD_CHANNEL}" pytorch "${cudatoolkit}"
2727

2828
printf "* Installing torchvision\n"
29-
python setup.py develop
29+
python setup.py develop

.circleci/unittest/windows/scripts/install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ else
2525
cudatoolkit="cudatoolkit=${version}"
2626
fi
2727
printf "Installing PyTorch with %s\n" "${cudatoolkit}"
28-
conda install -y -c pytorch-nightly pytorch "${cudatoolkit}"
28+
conda install -y -c "pytorch-${UPLOAD_CHANNEL}" pytorch "${cudatoolkit}"
2929

3030
printf "* Installing torchvision\n"
31-
"$this_dir/vc_env_helper.bat" python setup.py develop
31+
"$this_dir/vc_env_helper.bat" python setup.py develop

packaging/build_cmake.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ fi
2323
setup_visual_studio_constraint
2424
setup_junit_results_folder
2525

26-
conda install -yq pytorch=$PYTORCH_VERSION $CONDA_CUDATOOLKIT_CONSTRAINT $CONDA_CPUONLY_FEATURE -c pytorch-nightly
26+
conda install -yq pytorch=$PYTORCH_VERSION $CONDA_CUDATOOLKIT_CONSTRAINT $CONDA_CPUONLY_FEATURE -c "pytorch-${UPLOAD_CHANNEL}"
2727
TORCH_PATH=$(dirname $(python -c "import torch; print(torch.__file__)"))
2828

2929
if [[ "$(uname)" == Darwin || "$OSTYPE" == "msys" ]]; then

0 commit comments

Comments
 (0)