@@ -722,96 +722,6 @@ jobs:
722
722
conda activate python${PYTHON_VERSION}
723
723
python -c "import torchvision"
724
724
725
- unittest_linux_cpu:
726
- <<: *binary_common
727
- docker:
728
- - image: "pytorch/manylinux-cpu"
729
- resource_class: 2xlarge+
730
- steps:
731
- - checkout
732
- - designate_upload_channel
733
- - run:
734
- name: Generate cache key
735
- # This will refresh cache on Sundays, nightly build should generate new cache.
736
- command: echo "$(date +"%Y-%U")" > .circleci-weekly
737
- - restore_cache:
738
- {% raw %}
739
- keys:
740
- - env-v2-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
741
- {% endraw %}
742
- - run:
743
- name: Setup
744
- command: .circleci/unittest/linux/scripts/setup_env.sh
745
- - save_cache:
746
- {% raw %}
747
- key: env-v2-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
748
- {% endraw %}
749
- paths:
750
- - conda
751
- - env
752
- - run:
753
- name: Install torchvision
754
- command: .circleci/unittest/linux/scripts/install.sh
755
- - run:
756
- name: Run tests
757
- command: .circleci/unittest/linux/scripts/run_test.sh
758
- - run:
759
- name: Post process
760
- command: .circleci/unittest/linux/scripts/post_process.sh
761
- - store_test_results:
762
- path: test-results
763
-
764
- unittest_linux_gpu:
765
- <<: *binary_common
766
- machine:
767
- image: ubuntu-2004-cuda-11.4:202110-01
768
- resource_class: gpu.nvidia.medium
769
- environment:
770
- image_name: "pytorch/manylinux-cuda117"
771
- CU_VERSION: << parameters.cu_version >>
772
- PYTHON_VERSION: << parameters.python_version >>
773
- steps:
774
- - checkout
775
- - designate_upload_channel
776
- - run:
777
- name: Generate cache key
778
- # This will refresh cache on Sundays, nightly build should generate new cache.
779
- command: echo "$(date +"%Y-%U")" > .circleci-weekly
780
- - restore_cache:
781
- {% raw %}
782
- keys:
783
- - env-v3-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
784
- {% endraw %}
785
- - run:
786
- name: Setup
787
- command: docker run -e PYTHON_VERSION -t --gpus all -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/setup_env.sh
788
- - save_cache:
789
- {% raw %}
790
- key: env-v3-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
791
- {% endraw %}
792
- paths:
793
- - conda
794
- - env
795
- - run:
796
- # Here we create an envlist file that contains some env variables that we want the docker container to be aware of.
797
- # Normally, the CIRCLECI variable is set and available on all CI workflows: https://circleci.com/docs/2.0/env-vars/#built-in-environment-variables.
798
- # They're avaiable in all the other workflows (OSX and Windows).
799
- # But here, we're running the unittest_linux_gpu workflows in a docker container, where those variables aren't accessible.
800
- # So instead we dump the variables we need in env.list and we pass that file when invoking "docker run".
801
- name: export CIRCLECI env var
802
- command: echo "CIRCLECI=true" >> ./env.list
803
- - run:
804
- name: Install torchvision
805
- command: docker run -t --gpus all -v $PWD:$PWD -w $PWD -e UPLOAD_CHANNEL -e CU_VERSION "${image_name}" .circleci/unittest/linux/scripts/install.sh
806
- - run:
807
- name: Run tests
808
- command: docker run --env-file ./env.list -t --gpus all -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/run_test.sh
809
- - run:
810
- name: Post Process
811
- command: docker run -t --gpus all -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/post_process.sh
812
- - store_test_results:
813
- path: test-results
814
-
815
725
unittest_windows_cpu:
816
726
<<: *binary_common
817
727
executor:
0 commit comments