Unverified Commit e1c50d9c authored by guyang3532's avatar guyang3532 Committed by GitHub
Browse files

Add smoke test for CI (#2437)

parent 8b029651
...@@ -64,6 +64,7 @@ binary_common: &binary_common ...@@ -64,6 +64,7 @@ binary_common: &binary_common
cu_version: cu_version:
description: "CUDA version to build against, in CU format (e.g., cpu or cu100)" description: "CUDA version to build against, in CU format (e.g., cpu or cu100)"
type: string type: string
default: "cpu"
unicode_abi: unicode_abi:
description: "Python 2.7 wheel only: whether or not we are cp27mu (default: no)" description: "Python 2.7 wheel only: whether or not we are cp27mu (default: no)"
type: string type: string
...@@ -78,6 +79,11 @@ binary_common: &binary_common ...@@ -78,6 +79,11 @@ binary_common: &binary_common
UNICODE_ABI: << parameters.unicode_abi >> UNICODE_ABI: << parameters.unicode_abi >>
CU_VERSION: << parameters.cu_version >> CU_VERSION: << parameters.cu_version >>
smoke_test_common: &smoke_test_common
<<: *binary_common
docker:
- image: torchvision/smoke_test:latest
jobs: jobs:
circleci_consistency: circleci_consistency:
docker: docker:
...@@ -288,6 +294,109 @@ jobs: ...@@ -288,6 +294,109 @@ jobs:
aws s3 cp "$pkg" "s3://pytorch/whl/${UPLOAD_CHANNEL}/<< parameters.subfolder >>" --acl public-read aws s3 cp "$pkg" "s3://pytorch/whl/${UPLOAD_CHANNEL}/<< parameters.subfolder >>" --acl public-read
done done
smoke_test_linux_conda:
<<: *smoke_test_common
steps:
- attach_workspace:
at: ~/workspace
- run:
name: install binaries
command: |
set -x
source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION}
conda install -v -y -c pytorch-nightly pytorch
conda install -v -y $(ls ~/workspace/torchvision*.tar.bz2)
- run:
name: smoke test
command: |
source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION}
python -c "import torchvision"
smoke_test_linux_pip:
<<: *smoke_test_common
steps:
- attach_workspace:
at: ~/workspace
- run:
name: install binaries
command: |
set -x
source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION}
pip install $(ls ~/workspace/torchvision*.whl) --pre -f https://download.pytorch.org/whl/nightly/torch_nightly.html
- run:
name: smoke test
command: |
source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION}
python -c "import torchvision"
smoke_test_docker_image_build:
machine:
image: ubuntu-1604:201903-01
resource_class: large
environment:
image_name: torchvision/smoke_test
steps:
- checkout
- run:
name: Build and push Docker image
no_output_timeout: "1h"
command: |
set +x
echo "${DOCKER_HUB_TOKEN}" | docker login --username "${DOCKER_HUB_USERNAME}" --password-stdin
set -x
cd .circleci/smoke_test/docker && docker build . -t ${image_name}:${CIRCLE_WORKFLOW_ID}
docker tag ${image_name}:${CIRCLE_WORKFLOW_ID} ${image_name}:latest
docker push ${image_name}:${CIRCLE_WORKFLOW_ID}
docker push ${image_name}:latest
smoke_test_win_conda:
<<: *binary_common
executor:
name: windows-cpu
steps:
- attach_workspace:
at: ~/workspace
- run:
name: install binaries
command: |
set -x
eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')"
conda env remove -n python${PYTHON_VERSION} || true
conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION}
conda activate python${PYTHON_VERSION}
conda install Pillow
conda install -v -y -c pytorch-nightly pytorch
conda install -v -y $(ls ~/workspace/torchvision*.tar.bz2)
- run:
name: smoke test
command: |
eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')"
conda activate python${PYTHON_VERSION}
python -c "import torchvision"
smoke_test_win_pip:
<<: *binary_common
executor:
name: windows-cpu
steps:
- attach_workspace:
at: ~/workspace
- run:
name: install binaries
command: |
set -x
eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')"
conda env remove -n python${PYTHON_VERSION} || true
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
- run:
name: smoke test
command: |
eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')"
conda activate python${PYTHON_VERSION}
python -c "import torchvision"
unittest_linux_cpu: unittest_linux_cpu:
<<: *binary_common <<: *binary_common
docker: docker:
...@@ -893,6 +1002,15 @@ workflows: ...@@ -893,6 +1002,15 @@ workflows:
requires: requires:
- nightly_binary_linux_wheel_py3.6_cpu - nightly_binary_linux_wheel_py3.6_cpu
subfolder: cpu/ subfolder: cpu/
- smoke_test_linux_pip:
filters:
branches:
only:
- nightly
name: nightly_binary_linux_wheel_py3.6_cpu_smoke_test_pip
python_version: '3.6'
requires:
- nightly_binary_linux_wheel_py3.6_cpu_upload
- binary_linux_wheel: - binary_linux_wheel:
cu_version: cu92 cu_version: cu92
filters: filters:
...@@ -914,6 +1032,15 @@ workflows: ...@@ -914,6 +1032,15 @@ workflows:
requires: requires:
- nightly_binary_linux_wheel_py3.6_cu92 - nightly_binary_linux_wheel_py3.6_cu92
subfolder: cu92/ subfolder: cu92/
- smoke_test_linux_pip:
filters:
branches:
only:
- nightly
name: nightly_binary_linux_wheel_py3.6_cu92_smoke_test_pip
python_version: '3.6'
requires:
- nightly_binary_linux_wheel_py3.6_cu92_upload
- binary_linux_wheel: - binary_linux_wheel:
cu_version: cu101 cu_version: cu101
filters: filters:
...@@ -935,6 +1062,15 @@ workflows: ...@@ -935,6 +1062,15 @@ workflows:
requires: requires:
- nightly_binary_linux_wheel_py3.6_cu101 - nightly_binary_linux_wheel_py3.6_cu101
subfolder: cu101/ subfolder: cu101/
- smoke_test_linux_pip:
filters:
branches:
only:
- nightly
name: nightly_binary_linux_wheel_py3.6_cu101_smoke_test_pip
python_version: '3.6'
requires:
- nightly_binary_linux_wheel_py3.6_cu101_upload
- binary_linux_wheel: - binary_linux_wheel:
cu_version: cu102 cu_version: cu102
filters: filters:
...@@ -956,6 +1092,15 @@ workflows: ...@@ -956,6 +1092,15 @@ workflows:
requires: requires:
- nightly_binary_linux_wheel_py3.6_cu102 - nightly_binary_linux_wheel_py3.6_cu102
subfolder: cu102/ subfolder: cu102/
- smoke_test_linux_pip:
filters:
branches:
only:
- nightly
name: nightly_binary_linux_wheel_py3.6_cu102_smoke_test_pip
python_version: '3.6'
requires:
- nightly_binary_linux_wheel_py3.6_cu102_upload
- binary_linux_wheel: - binary_linux_wheel:
cu_version: cpu cu_version: cpu
filters: filters:
...@@ -977,6 +1122,15 @@ workflows: ...@@ -977,6 +1122,15 @@ workflows:
requires: requires:
- nightly_binary_linux_wheel_py3.7_cpu - nightly_binary_linux_wheel_py3.7_cpu
subfolder: cpu/ subfolder: cpu/
- smoke_test_linux_pip:
filters:
branches:
only:
- nightly
name: nightly_binary_linux_wheel_py3.7_cpu_smoke_test_pip
python_version: '3.7'
requires:
- nightly_binary_linux_wheel_py3.7_cpu_upload
- binary_linux_wheel: - binary_linux_wheel:
cu_version: cu92 cu_version: cu92
filters: filters:
...@@ -998,6 +1152,15 @@ workflows: ...@@ -998,6 +1152,15 @@ workflows:
requires: requires:
- nightly_binary_linux_wheel_py3.7_cu92 - nightly_binary_linux_wheel_py3.7_cu92
subfolder: cu92/ subfolder: cu92/
- smoke_test_linux_pip:
filters:
branches:
only:
- nightly
name: nightly_binary_linux_wheel_py3.7_cu92_smoke_test_pip
python_version: '3.7'
requires:
- nightly_binary_linux_wheel_py3.7_cu92_upload
- binary_linux_wheel: - binary_linux_wheel:
cu_version: cu101 cu_version: cu101
filters: filters:
...@@ -1019,6 +1182,15 @@ workflows: ...@@ -1019,6 +1182,15 @@ workflows:
requires: requires:
- nightly_binary_linux_wheel_py3.7_cu101 - nightly_binary_linux_wheel_py3.7_cu101
subfolder: cu101/ subfolder: cu101/
- smoke_test_linux_pip:
filters:
branches:
only:
- nightly
name: nightly_binary_linux_wheel_py3.7_cu101_smoke_test_pip
python_version: '3.7'
requires:
- nightly_binary_linux_wheel_py3.7_cu101_upload
- binary_linux_wheel: - binary_linux_wheel:
cu_version: cu102 cu_version: cu102
filters: filters:
...@@ -1040,6 +1212,15 @@ workflows: ...@@ -1040,6 +1212,15 @@ workflows:
requires: requires:
- nightly_binary_linux_wheel_py3.7_cu102 - nightly_binary_linux_wheel_py3.7_cu102
subfolder: cu102/ subfolder: cu102/
- smoke_test_linux_pip:
filters:
branches:
only:
- nightly
name: nightly_binary_linux_wheel_py3.7_cu102_smoke_test_pip
python_version: '3.7'
requires:
- nightly_binary_linux_wheel_py3.7_cu102_upload
- binary_linux_wheel: - binary_linux_wheel:
cu_version: cpu cu_version: cpu
filters: filters:
...@@ -1061,6 +1242,15 @@ workflows: ...@@ -1061,6 +1242,15 @@ workflows:
requires: requires:
- nightly_binary_linux_wheel_py3.8_cpu - nightly_binary_linux_wheel_py3.8_cpu
subfolder: cpu/ subfolder: cpu/
- smoke_test_linux_pip:
filters:
branches:
only:
- nightly
name: nightly_binary_linux_wheel_py3.8_cpu_smoke_test_pip
python_version: '3.8'
requires:
- nightly_binary_linux_wheel_py3.8_cpu_upload
- binary_linux_wheel: - binary_linux_wheel:
cu_version: cu92 cu_version: cu92
filters: filters:
...@@ -1082,6 +1272,15 @@ workflows: ...@@ -1082,6 +1272,15 @@ workflows:
requires: requires:
- nightly_binary_linux_wheel_py3.8_cu92 - nightly_binary_linux_wheel_py3.8_cu92
subfolder: cu92/ subfolder: cu92/
- smoke_test_linux_pip:
filters:
branches:
only:
- nightly
name: nightly_binary_linux_wheel_py3.8_cu92_smoke_test_pip
python_version: '3.8'
requires:
- nightly_binary_linux_wheel_py3.8_cu92_upload
- binary_linux_wheel: - binary_linux_wheel:
cu_version: cu101 cu_version: cu101
filters: filters:
...@@ -1103,6 +1302,15 @@ workflows: ...@@ -1103,6 +1302,15 @@ workflows:
requires: requires:
- nightly_binary_linux_wheel_py3.8_cu101 - nightly_binary_linux_wheel_py3.8_cu101
subfolder: cu101/ subfolder: cu101/
- smoke_test_linux_pip:
filters:
branches:
only:
- nightly
name: nightly_binary_linux_wheel_py3.8_cu101_smoke_test_pip
python_version: '3.8'
requires:
- nightly_binary_linux_wheel_py3.8_cu101_upload
- binary_linux_wheel: - binary_linux_wheel:
cu_version: cu102 cu_version: cu102
filters: filters:
...@@ -1124,6 +1332,15 @@ workflows: ...@@ -1124,6 +1332,15 @@ workflows:
requires: requires:
- nightly_binary_linux_wheel_py3.8_cu102 - nightly_binary_linux_wheel_py3.8_cu102
subfolder: cu102/ subfolder: cu102/
- smoke_test_linux_pip:
filters:
branches:
only:
- nightly
name: nightly_binary_linux_wheel_py3.8_cu102_smoke_test_pip
python_version: '3.8'
requires:
- nightly_binary_linux_wheel_py3.8_cu102_upload
- binary_macos_wheel: - binary_macos_wheel:
cu_version: cpu cu_version: cpu
filters: filters:
...@@ -1207,6 +1424,15 @@ workflows: ...@@ -1207,6 +1424,15 @@ workflows:
requires: requires:
- nightly_binary_win_wheel_py3.6_cpu - nightly_binary_win_wheel_py3.6_cpu
subfolder: cpu/ subfolder: cpu/
- smoke_test_win_pip:
filters:
branches:
only:
- nightly
name: nightly_binary_win_wheel_py3.6_cpu_smoke_test_pip
python_version: '3.6'
requires:
- nightly_binary_win_wheel_py3.6_cpu_upload
- binary_win_wheel: - binary_win_wheel:
cu_version: cu92 cu_version: cu92
filters: filters:
...@@ -1227,6 +1453,15 @@ workflows: ...@@ -1227,6 +1453,15 @@ workflows:
requires: requires:
- nightly_binary_win_wheel_py3.6_cu92 - nightly_binary_win_wheel_py3.6_cu92
subfolder: cu92/ subfolder: cu92/
- smoke_test_win_pip:
filters:
branches:
only:
- nightly
name: nightly_binary_win_wheel_py3.6_cu92_smoke_test_pip
python_version: '3.6'
requires:
- nightly_binary_win_wheel_py3.6_cu92_upload
- binary_win_wheel: - binary_win_wheel:
cu_version: cu101 cu_version: cu101
filters: filters:
...@@ -1247,6 +1482,15 @@ workflows: ...@@ -1247,6 +1482,15 @@ workflows:
requires: requires:
- nightly_binary_win_wheel_py3.6_cu101 - nightly_binary_win_wheel_py3.6_cu101
subfolder: cu101/ subfolder: cu101/
- smoke_test_win_pip:
filters:
branches:
only:
- nightly
name: nightly_binary_win_wheel_py3.6_cu101_smoke_test_pip
python_version: '3.6'
requires:
- nightly_binary_win_wheel_py3.6_cu101_upload
- binary_win_wheel: - binary_win_wheel:
cu_version: cu102 cu_version: cu102
filters: filters:
...@@ -1267,6 +1511,15 @@ workflows: ...@@ -1267,6 +1511,15 @@ workflows:
requires: requires:
- nightly_binary_win_wheel_py3.6_cu102 - nightly_binary_win_wheel_py3.6_cu102
subfolder: cu102/ subfolder: cu102/
- smoke_test_win_pip:
filters:
branches:
only:
- nightly
name: nightly_binary_win_wheel_py3.6_cu102_smoke_test_pip
python_version: '3.6'
requires:
- nightly_binary_win_wheel_py3.6_cu102_upload
- binary_win_wheel: - binary_win_wheel:
cu_version: cpu cu_version: cpu
filters: filters:
...@@ -1287,6 +1540,15 @@ workflows: ...@@ -1287,6 +1540,15 @@ workflows:
requires: requires:
- nightly_binary_win_wheel_py3.7_cpu - nightly_binary_win_wheel_py3.7_cpu
subfolder: cpu/ subfolder: cpu/
- smoke_test_win_pip:
filters:
branches:
only:
- nightly
name: nightly_binary_win_wheel_py3.7_cpu_smoke_test_pip
python_version: '3.7'
requires:
- nightly_binary_win_wheel_py3.7_cpu_upload
- binary_win_wheel: - binary_win_wheel:
cu_version: cu92 cu_version: cu92
filters: filters:
...@@ -1307,6 +1569,15 @@ workflows: ...@@ -1307,6 +1569,15 @@ workflows:
requires: requires:
- nightly_binary_win_wheel_py3.7_cu92 - nightly_binary_win_wheel_py3.7_cu92
subfolder: cu92/ subfolder: cu92/
- smoke_test_win_pip:
filters:
branches:
only:
- nightly
name: nightly_binary_win_wheel_py3.7_cu92_smoke_test_pip
python_version: '3.7'
requires:
- nightly_binary_win_wheel_py3.7_cu92_upload
- binary_win_wheel: - binary_win_wheel:
cu_version: cu101 cu_version: cu101
filters: filters:
...@@ -1327,6 +1598,15 @@ workflows: ...@@ -1327,6 +1598,15 @@ workflows:
requires: requires:
- nightly_binary_win_wheel_py3.7_cu101 - nightly_binary_win_wheel_py3.7_cu101
subfolder: cu101/ subfolder: cu101/
- smoke_test_win_pip:
filters:
branches:
only:
- nightly
name: nightly_binary_win_wheel_py3.7_cu101_smoke_test_pip
python_version: '3.7'
requires:
- nightly_binary_win_wheel_py3.7_cu101_upload
- binary_win_wheel: - binary_win_wheel:
cu_version: cu102 cu_version: cu102
filters: filters:
...@@ -1347,6 +1627,15 @@ workflows: ...@@ -1347,6 +1627,15 @@ workflows:
requires: requires:
- nightly_binary_win_wheel_py3.7_cu102 - nightly_binary_win_wheel_py3.7_cu102
subfolder: cu102/ subfolder: cu102/
- smoke_test_win_pip:
filters:
branches:
only:
- nightly
name: nightly_binary_win_wheel_py3.7_cu102_smoke_test_pip
python_version: '3.7'
requires:
- nightly_binary_win_wheel_py3.7_cu102_upload
- binary_win_wheel: - binary_win_wheel:
cu_version: cpu cu_version: cpu
filters: filters:
...@@ -1367,6 +1656,15 @@ workflows: ...@@ -1367,6 +1656,15 @@ workflows:
requires: requires:
- nightly_binary_win_wheel_py3.8_cpu - nightly_binary_win_wheel_py3.8_cpu
subfolder: cpu/ subfolder: cpu/
- smoke_test_win_pip:
filters:
branches:
only:
- nightly
name: nightly_binary_win_wheel_py3.8_cpu_smoke_test_pip
python_version: '3.8'
requires:
- nightly_binary_win_wheel_py3.8_cpu_upload
- binary_win_wheel: - binary_win_wheel:
cu_version: cu92 cu_version: cu92
filters: filters:
...@@ -1387,6 +1685,15 @@ workflows: ...@@ -1387,6 +1685,15 @@ workflows:
requires: requires:
- nightly_binary_win_wheel_py3.8_cu92 - nightly_binary_win_wheel_py3.8_cu92
subfolder: cu92/ subfolder: cu92/
- smoke_test_win_pip:
filters:
branches:
only:
- nightly
name: nightly_binary_win_wheel_py3.8_cu92_smoke_test_pip
python_version: '3.8'
requires:
- nightly_binary_win_wheel_py3.8_cu92_upload
- binary_win_wheel: - binary_win_wheel:
cu_version: cu101 cu_version: cu101
filters: filters:
...@@ -1407,6 +1714,15 @@ workflows: ...@@ -1407,6 +1714,15 @@ workflows:
requires: requires:
- nightly_binary_win_wheel_py3.8_cu101 - nightly_binary_win_wheel_py3.8_cu101
subfolder: cu101/ subfolder: cu101/
- smoke_test_win_pip:
filters:
branches:
only:
- nightly
name: nightly_binary_win_wheel_py3.8_cu101_smoke_test_pip
python_version: '3.8'
requires:
- nightly_binary_win_wheel_py3.8_cu101_upload
- binary_win_wheel: - binary_win_wheel:
cu_version: cu102 cu_version: cu102
filters: filters:
...@@ -1427,6 +1743,15 @@ workflows: ...@@ -1427,6 +1743,15 @@ workflows:
requires: requires:
- nightly_binary_win_wheel_py3.8_cu102 - nightly_binary_win_wheel_py3.8_cu102
subfolder: cu102/ subfolder: cu102/
- smoke_test_win_pip:
filters:
branches:
only:
- nightly
name: nightly_binary_win_wheel_py3.8_cu102_smoke_test_pip
python_version: '3.8'
requires:
- nightly_binary_win_wheel_py3.8_cu102_upload
- binary_linux_conda: - binary_linux_conda:
cu_version: cpu cu_version: cpu
filters: filters:
...@@ -1447,6 +1772,15 @@ workflows: ...@@ -1447,6 +1772,15 @@ workflows:
name: nightly_binary_linux_conda_py3.6_cpu_upload name: nightly_binary_linux_conda_py3.6_cpu_upload
requires: requires:
- nightly_binary_linux_conda_py3.6_cpu - nightly_binary_linux_conda_py3.6_cpu
- smoke_test_linux_conda:
filters:
branches:
only:
- nightly
name: nightly_binary_linux_conda_py3.6_cpu_smoke_test_conda
python_version: '3.6'
requires:
- nightly_binary_linux_conda_py3.6_cpu_upload
- binary_linux_conda: - binary_linux_conda:
cu_version: cu92 cu_version: cu92
filters: filters:
...@@ -1467,6 +1801,15 @@ workflows: ...@@ -1467,6 +1801,15 @@ workflows:
name: nightly_binary_linux_conda_py3.6_cu92_upload name: nightly_binary_linux_conda_py3.6_cu92_upload
requires: requires:
- nightly_binary_linux_conda_py3.6_cu92 - nightly_binary_linux_conda_py3.6_cu92
- smoke_test_linux_conda:
filters:
branches:
only:
- nightly
name: nightly_binary_linux_conda_py3.6_cu92_smoke_test_conda
python_version: '3.6'
requires:
- nightly_binary_linux_conda_py3.6_cu92_upload
- binary_linux_conda: - binary_linux_conda:
cu_version: cu101 cu_version: cu101
filters: filters:
...@@ -1487,6 +1830,15 @@ workflows: ...@@ -1487,6 +1830,15 @@ workflows:
name: nightly_binary_linux_conda_py3.6_cu101_upload name: nightly_binary_linux_conda_py3.6_cu101_upload
requires: requires:
- nightly_binary_linux_conda_py3.6_cu101 - nightly_binary_linux_conda_py3.6_cu101
- smoke_test_linux_conda:
filters:
branches:
only:
- nightly
name: nightly_binary_linux_conda_py3.6_cu101_smoke_test_conda
python_version: '3.6'
requires:
- nightly_binary_linux_conda_py3.6_cu101_upload
- binary_linux_conda: - binary_linux_conda:
cu_version: cu102 cu_version: cu102
filters: filters:
...@@ -1507,6 +1859,15 @@ workflows: ...@@ -1507,6 +1859,15 @@ workflows:
name: nightly_binary_linux_conda_py3.6_cu102_upload name: nightly_binary_linux_conda_py3.6_cu102_upload
requires: requires:
- nightly_binary_linux_conda_py3.6_cu102 - nightly_binary_linux_conda_py3.6_cu102
- smoke_test_linux_conda:
filters:
branches:
only:
- nightly
name: nightly_binary_linux_conda_py3.6_cu102_smoke_test_conda
python_version: '3.6'
requires:
- nightly_binary_linux_conda_py3.6_cu102_upload
- binary_linux_conda: - binary_linux_conda:
cu_version: cpu cu_version: cpu
filters: filters:
...@@ -1527,6 +1888,15 @@ workflows: ...@@ -1527,6 +1888,15 @@ workflows:
name: nightly_binary_linux_conda_py3.7_cpu_upload name: nightly_binary_linux_conda_py3.7_cpu_upload
requires: requires:
- nightly_binary_linux_conda_py3.7_cpu - nightly_binary_linux_conda_py3.7_cpu
- smoke_test_linux_conda:
filters:
branches:
only:
- nightly
name: nightly_binary_linux_conda_py3.7_cpu_smoke_test_conda
python_version: '3.7'
requires:
- nightly_binary_linux_conda_py3.7_cpu_upload
- binary_linux_conda: - binary_linux_conda:
cu_version: cu92 cu_version: cu92
filters: filters:
...@@ -1547,6 +1917,15 @@ workflows: ...@@ -1547,6 +1917,15 @@ workflows:
name: nightly_binary_linux_conda_py3.7_cu92_upload name: nightly_binary_linux_conda_py3.7_cu92_upload
requires: requires:
- nightly_binary_linux_conda_py3.7_cu92 - nightly_binary_linux_conda_py3.7_cu92
- smoke_test_linux_conda:
filters:
branches:
only:
- nightly
name: nightly_binary_linux_conda_py3.7_cu92_smoke_test_conda
python_version: '3.7'
requires:
- nightly_binary_linux_conda_py3.7_cu92_upload
- binary_linux_conda: - binary_linux_conda:
cu_version: cu101 cu_version: cu101
filters: filters:
...@@ -1567,6 +1946,15 @@ workflows: ...@@ -1567,6 +1946,15 @@ workflows:
name: nightly_binary_linux_conda_py3.7_cu101_upload name: nightly_binary_linux_conda_py3.7_cu101_upload
requires: requires:
- nightly_binary_linux_conda_py3.7_cu101 - nightly_binary_linux_conda_py3.7_cu101
- smoke_test_linux_conda:
filters:
branches:
only:
- nightly
name: nightly_binary_linux_conda_py3.7_cu101_smoke_test_conda
python_version: '3.7'
requires:
- nightly_binary_linux_conda_py3.7_cu101_upload
- binary_linux_conda: - binary_linux_conda:
cu_version: cu102 cu_version: cu102
filters: filters:
...@@ -1587,6 +1975,15 @@ workflows: ...@@ -1587,6 +1975,15 @@ workflows:
name: nightly_binary_linux_conda_py3.7_cu102_upload name: nightly_binary_linux_conda_py3.7_cu102_upload
requires: requires:
- nightly_binary_linux_conda_py3.7_cu102 - nightly_binary_linux_conda_py3.7_cu102
- smoke_test_linux_conda:
filters:
branches:
only:
- nightly
name: nightly_binary_linux_conda_py3.7_cu102_smoke_test_conda
python_version: '3.7'
requires:
- nightly_binary_linux_conda_py3.7_cu102_upload
- binary_linux_conda: - binary_linux_conda:
cu_version: cpu cu_version: cpu
filters: filters:
...@@ -1607,6 +2004,15 @@ workflows: ...@@ -1607,6 +2004,15 @@ workflows:
name: nightly_binary_linux_conda_py3.8_cpu_upload name: nightly_binary_linux_conda_py3.8_cpu_upload
requires: requires:
- nightly_binary_linux_conda_py3.8_cpu - nightly_binary_linux_conda_py3.8_cpu
- smoke_test_linux_conda:
filters:
branches:
only:
- nightly
name: nightly_binary_linux_conda_py3.8_cpu_smoke_test_conda
python_version: '3.8'
requires:
- nightly_binary_linux_conda_py3.8_cpu_upload
- binary_linux_conda: - binary_linux_conda:
cu_version: cu92 cu_version: cu92
filters: filters:
...@@ -1627,6 +2033,15 @@ workflows: ...@@ -1627,6 +2033,15 @@ workflows:
name: nightly_binary_linux_conda_py3.8_cu92_upload name: nightly_binary_linux_conda_py3.8_cu92_upload
requires: requires:
- nightly_binary_linux_conda_py3.8_cu92 - nightly_binary_linux_conda_py3.8_cu92
- smoke_test_linux_conda:
filters:
branches:
only:
- nightly
name: nightly_binary_linux_conda_py3.8_cu92_smoke_test_conda
python_version: '3.8'
requires:
- nightly_binary_linux_conda_py3.8_cu92_upload
- binary_linux_conda: - binary_linux_conda:
cu_version: cu101 cu_version: cu101
filters: filters:
...@@ -1647,6 +2062,15 @@ workflows: ...@@ -1647,6 +2062,15 @@ workflows:
name: nightly_binary_linux_conda_py3.8_cu101_upload name: nightly_binary_linux_conda_py3.8_cu101_upload
requires: requires:
- nightly_binary_linux_conda_py3.8_cu101 - nightly_binary_linux_conda_py3.8_cu101
- smoke_test_linux_conda:
filters:
branches:
only:
- nightly
name: nightly_binary_linux_conda_py3.8_cu101_smoke_test_conda
python_version: '3.8'
requires:
- nightly_binary_linux_conda_py3.8_cu101_upload
- binary_linux_conda: - binary_linux_conda:
cu_version: cu102 cu_version: cu102
filters: filters:
...@@ -1667,6 +2091,15 @@ workflows: ...@@ -1667,6 +2091,15 @@ workflows:
name: nightly_binary_linux_conda_py3.8_cu102_upload name: nightly_binary_linux_conda_py3.8_cu102_upload
requires: requires:
- nightly_binary_linux_conda_py3.8_cu102 - nightly_binary_linux_conda_py3.8_cu102
- smoke_test_linux_conda:
filters:
branches:
only:
- nightly
name: nightly_binary_linux_conda_py3.8_cu102_smoke_test_conda
python_version: '3.8'
requires:
- nightly_binary_linux_conda_py3.8_cu102_upload
- binary_macos_conda: - binary_macos_conda:
cu_version: cpu cu_version: cpu
filters: filters:
...@@ -1746,6 +2179,15 @@ workflows: ...@@ -1746,6 +2179,15 @@ workflows:
name: nightly_binary_win_conda_py3.6_cpu_upload name: nightly_binary_win_conda_py3.6_cpu_upload
requires: requires:
- nightly_binary_win_conda_py3.6_cpu - nightly_binary_win_conda_py3.6_cpu
- smoke_test_win_conda:
filters:
branches:
only:
- nightly
name: nightly_binary_win_conda_py3.6_cpu_smoke_test_conda
python_version: '3.6'
requires:
- nightly_binary_win_conda_py3.6_cpu_upload
- binary_win_conda: - binary_win_conda:
cu_version: cu92 cu_version: cu92
filters: filters:
...@@ -1765,6 +2207,15 @@ workflows: ...@@ -1765,6 +2207,15 @@ workflows:
name: nightly_binary_win_conda_py3.6_cu92_upload name: nightly_binary_win_conda_py3.6_cu92_upload
requires: requires:
- nightly_binary_win_conda_py3.6_cu92 - nightly_binary_win_conda_py3.6_cu92
- smoke_test_win_conda:
filters:
branches:
only:
- nightly
name: nightly_binary_win_conda_py3.6_cu92_smoke_test_conda
python_version: '3.6'
requires:
- nightly_binary_win_conda_py3.6_cu92_upload
- binary_win_conda: - binary_win_conda:
cu_version: cu101 cu_version: cu101
filters: filters:
...@@ -1784,6 +2235,15 @@ workflows: ...@@ -1784,6 +2235,15 @@ workflows:
name: nightly_binary_win_conda_py3.6_cu101_upload name: nightly_binary_win_conda_py3.6_cu101_upload
requires: requires:
- nightly_binary_win_conda_py3.6_cu101 - nightly_binary_win_conda_py3.6_cu101
- smoke_test_win_conda:
filters:
branches:
only:
- nightly
name: nightly_binary_win_conda_py3.6_cu101_smoke_test_conda
python_version: '3.6'
requires:
- nightly_binary_win_conda_py3.6_cu101_upload
- binary_win_conda: - binary_win_conda:
cu_version: cu102 cu_version: cu102
filters: filters:
...@@ -1803,6 +2263,15 @@ workflows: ...@@ -1803,6 +2263,15 @@ workflows:
name: nightly_binary_win_conda_py3.6_cu102_upload name: nightly_binary_win_conda_py3.6_cu102_upload
requires: requires:
- nightly_binary_win_conda_py3.6_cu102 - nightly_binary_win_conda_py3.6_cu102
- smoke_test_win_conda:
filters:
branches:
only:
- nightly
name: nightly_binary_win_conda_py3.6_cu102_smoke_test_conda
python_version: '3.6'
requires:
- nightly_binary_win_conda_py3.6_cu102_upload
- binary_win_conda: - binary_win_conda:
cu_version: cpu cu_version: cpu
filters: filters:
...@@ -1822,6 +2291,15 @@ workflows: ...@@ -1822,6 +2291,15 @@ workflows:
name: nightly_binary_win_conda_py3.7_cpu_upload name: nightly_binary_win_conda_py3.7_cpu_upload
requires: requires:
- nightly_binary_win_conda_py3.7_cpu - nightly_binary_win_conda_py3.7_cpu
- smoke_test_win_conda:
filters:
branches:
only:
- nightly
name: nightly_binary_win_conda_py3.7_cpu_smoke_test_conda
python_version: '3.7'
requires:
- nightly_binary_win_conda_py3.7_cpu_upload
- binary_win_conda: - binary_win_conda:
cu_version: cu92 cu_version: cu92
filters: filters:
...@@ -1841,6 +2319,15 @@ workflows: ...@@ -1841,6 +2319,15 @@ workflows:
name: nightly_binary_win_conda_py3.7_cu92_upload name: nightly_binary_win_conda_py3.7_cu92_upload
requires: requires:
- nightly_binary_win_conda_py3.7_cu92 - nightly_binary_win_conda_py3.7_cu92
- smoke_test_win_conda:
filters:
branches:
only:
- nightly
name: nightly_binary_win_conda_py3.7_cu92_smoke_test_conda
python_version: '3.7'
requires:
- nightly_binary_win_conda_py3.7_cu92_upload
- binary_win_conda: - binary_win_conda:
cu_version: cu101 cu_version: cu101
filters: filters:
...@@ -1860,6 +2347,15 @@ workflows: ...@@ -1860,6 +2347,15 @@ workflows:
name: nightly_binary_win_conda_py3.7_cu101_upload name: nightly_binary_win_conda_py3.7_cu101_upload
requires: requires:
- nightly_binary_win_conda_py3.7_cu101 - nightly_binary_win_conda_py3.7_cu101
- smoke_test_win_conda:
filters:
branches:
only:
- nightly
name: nightly_binary_win_conda_py3.7_cu101_smoke_test_conda
python_version: '3.7'
requires:
- nightly_binary_win_conda_py3.7_cu101_upload
- binary_win_conda: - binary_win_conda:
cu_version: cu102 cu_version: cu102
filters: filters:
...@@ -1879,6 +2375,15 @@ workflows: ...@@ -1879,6 +2375,15 @@ workflows:
name: nightly_binary_win_conda_py3.7_cu102_upload name: nightly_binary_win_conda_py3.7_cu102_upload
requires: requires:
- nightly_binary_win_conda_py3.7_cu102 - nightly_binary_win_conda_py3.7_cu102
- smoke_test_win_conda:
filters:
branches:
only:
- nightly
name: nightly_binary_win_conda_py3.7_cu102_smoke_test_conda
python_version: '3.7'
requires:
- nightly_binary_win_conda_py3.7_cu102_upload
- binary_win_conda: - binary_win_conda:
cu_version: cpu cu_version: cpu
filters: filters:
...@@ -1898,6 +2403,15 @@ workflows: ...@@ -1898,6 +2403,15 @@ workflows:
name: nightly_binary_win_conda_py3.8_cpu_upload name: nightly_binary_win_conda_py3.8_cpu_upload
requires: requires:
- nightly_binary_win_conda_py3.8_cpu - nightly_binary_win_conda_py3.8_cpu
- smoke_test_win_conda:
filters:
branches:
only:
- nightly
name: nightly_binary_win_conda_py3.8_cpu_smoke_test_conda
python_version: '3.8'
requires:
- nightly_binary_win_conda_py3.8_cpu_upload
- binary_win_conda: - binary_win_conda:
cu_version: cu92 cu_version: cu92
filters: filters:
...@@ -1917,6 +2431,15 @@ workflows: ...@@ -1917,6 +2431,15 @@ workflows:
name: nightly_binary_win_conda_py3.8_cu92_upload name: nightly_binary_win_conda_py3.8_cu92_upload
requires: requires:
- nightly_binary_win_conda_py3.8_cu92 - nightly_binary_win_conda_py3.8_cu92
- smoke_test_win_conda:
filters:
branches:
only:
- nightly
name: nightly_binary_win_conda_py3.8_cu92_smoke_test_conda
python_version: '3.8'
requires:
- nightly_binary_win_conda_py3.8_cu92_upload
- binary_win_conda: - binary_win_conda:
cu_version: cu101 cu_version: cu101
filters: filters:
...@@ -1936,6 +2459,15 @@ workflows: ...@@ -1936,6 +2459,15 @@ workflows:
name: nightly_binary_win_conda_py3.8_cu101_upload name: nightly_binary_win_conda_py3.8_cu101_upload
requires: requires:
- nightly_binary_win_conda_py3.8_cu101 - nightly_binary_win_conda_py3.8_cu101
- smoke_test_win_conda:
filters:
branches:
only:
- nightly
name: nightly_binary_win_conda_py3.8_cu101_smoke_test_conda
python_version: '3.8'
requires:
- nightly_binary_win_conda_py3.8_cu101_upload
- binary_win_conda: - binary_win_conda:
cu_version: cu102 cu_version: cu102
filters: filters:
...@@ -1955,3 +2487,23 @@ workflows: ...@@ -1955,3 +2487,23 @@ workflows:
name: nightly_binary_win_conda_py3.8_cu102_upload name: nightly_binary_win_conda_py3.8_cu102_upload
requires: requires:
- nightly_binary_win_conda_py3.8_cu102 - nightly_binary_win_conda_py3.8_cu102
- smoke_test_win_conda:
filters:
branches:
only:
- nightly
name: nightly_binary_win_conda_py3.8_cu102_smoke_test_conda
python_version: '3.8'
requires:
- nightly_binary_win_conda_py3.8_cu102_upload
docker_build:
triggers:
- schedule:
cron: "0 10 * * 0"
filters:
branches:
only:
- master
jobs:
- smoke_test_docker_image_build:
context: org-member
\ No newline at end of file
...@@ -64,6 +64,7 @@ binary_common: &binary_common ...@@ -64,6 +64,7 @@ binary_common: &binary_common
cu_version: cu_version:
description: "CUDA version to build against, in CU format (e.g., cpu or cu100)" description: "CUDA version to build against, in CU format (e.g., cpu or cu100)"
type: string type: string
default: "cpu"
unicode_abi: unicode_abi:
description: "Python 2.7 wheel only: whether or not we are cp27mu (default: no)" description: "Python 2.7 wheel only: whether or not we are cp27mu (default: no)"
type: string type: string
...@@ -78,6 +79,11 @@ binary_common: &binary_common ...@@ -78,6 +79,11 @@ binary_common: &binary_common
UNICODE_ABI: << parameters.unicode_abi >> UNICODE_ABI: << parameters.unicode_abi >>
CU_VERSION: << parameters.cu_version >> CU_VERSION: << parameters.cu_version >>
smoke_test_common: &smoke_test_common
<<: *binary_common
docker:
- image: torchvision/smoke_test:latest
jobs: jobs:
circleci_consistency: circleci_consistency:
docker: docker:
...@@ -288,6 +294,109 @@ jobs: ...@@ -288,6 +294,109 @@ jobs:
aws s3 cp "$pkg" "s3://pytorch/whl/${UPLOAD_CHANNEL}/<< parameters.subfolder >>" --acl public-read aws s3 cp "$pkg" "s3://pytorch/whl/${UPLOAD_CHANNEL}/<< parameters.subfolder >>" --acl public-read
done done
smoke_test_linux_conda:
<<: *smoke_test_common
steps:
- attach_workspace:
at: ~/workspace
- run:
name: install binaries
command: |
set -x
source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION}
conda install -v -y -c pytorch-nightly pytorch
conda install -v -y $(ls ~/workspace/torchvision*.tar.bz2)
- run:
name: smoke test
command: |
source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION}
python -c "import torchvision"
smoke_test_linux_pip:
<<: *smoke_test_common
steps:
- attach_workspace:
at: ~/workspace
- run:
name: install binaries
command: |
set -x
source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION}
pip install $(ls ~/workspace/torchvision*.whl) --pre -f https://download.pytorch.org/whl/nightly/torch_nightly.html
- run:
name: smoke test
command: |
source /usr/local/etc/profile.d/conda.sh && conda activate python${PYTHON_VERSION}
python -c "import torchvision"
smoke_test_docker_image_build:
machine:
image: ubuntu-1604:201903-01
resource_class: large
environment:
image_name: torchvision/smoke_test
steps:
- checkout
- run:
name: Build and push Docker image
no_output_timeout: "1h"
command: |
set +x
echo "${DOCKER_HUB_TOKEN}" | docker login --username "${DOCKER_HUB_USERNAME}" --password-stdin
set -x
cd .circleci/smoke_test/docker && docker build . -t ${image_name}:${CIRCLE_WORKFLOW_ID}
docker tag ${image_name}:${CIRCLE_WORKFLOW_ID} ${image_name}:latest
docker push ${image_name}:${CIRCLE_WORKFLOW_ID}
docker push ${image_name}:latest
smoke_test_win_conda:
<<: *binary_common
executor:
name: windows-cpu
steps:
- attach_workspace:
at: ~/workspace
- run:
name: install binaries
command: |
set -x
eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')"
conda env remove -n python${PYTHON_VERSION} || true
conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION}
conda activate python${PYTHON_VERSION}
conda install Pillow
conda install -v -y -c pytorch-nightly pytorch
conda install -v -y $(ls ~/workspace/torchvision*.tar.bz2)
- run:
name: smoke test
command: |
eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')"
conda activate python${PYTHON_VERSION}
python -c "import torchvision"
smoke_test_win_pip:
<<: *binary_common
executor:
name: windows-cpu
steps:
- attach_workspace:
at: ~/workspace
- run:
name: install binaries
command: |
set -x
eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')"
conda env remove -n python${PYTHON_VERSION} || true
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
- run:
name: smoke test
command: |
eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')"
conda activate python${PYTHON_VERSION}
python -c "import torchvision"
unittest_linux_cpu: unittest_linux_cpu:
<<: *binary_common <<: *binary_common
docker: docker:
...@@ -463,3 +572,14 @@ workflows: ...@@ -463,3 +572,14 @@ workflows:
- python_type_check - python_type_check
- clang_format - clang_format
{{ build_workflows(prefix="nightly_", filter_branch="nightly", upload=True) }} {{ build_workflows(prefix="nightly_", filter_branch="nightly", upload=True) }}
docker_build:
triggers:
- schedule:
cron: "0 10 * * 0"
filters:
branches:
only:
- master
jobs:
- smoke_test_docker_image_build:
context: org-member
...@@ -55,6 +55,9 @@ def workflow_pair(btype, os_type, python_version, cu_version, unicode, prefix='' ...@@ -55,6 +55,9 @@ def workflow_pair(btype, os_type, python_version, cu_version, unicode, prefix=''
if upload: if upload:
w.append(generate_upload_workflow(base_workflow_name, os_type, btype, cu_version, filter_branch=filter_branch)) w.append(generate_upload_workflow(base_workflow_name, os_type, btype, cu_version, filter_branch=filter_branch))
if filter_branch == 'nightly' and os_type in ['linux', 'win']:
pydistro = 'pip' if btype == 'wheel' else 'conda'
w.append(generate_smoketest_workflow(pydistro, base_workflow_name, filter_branch, python_version, os_type))
return w return w
...@@ -133,6 +136,24 @@ def generate_upload_workflow(base_workflow_name, os_type, btype, cu_version, *, ...@@ -133,6 +136,24 @@ def generate_upload_workflow(base_workflow_name, os_type, btype, cu_version, *,
return {f"binary_{btype}_upload": d} return {f"binary_{btype}_upload": d}
def generate_smoketest_workflow(pydistro, base_workflow_name, filter_branch, python_version, os_type):
required_build_suffix = "_upload"
required_build_name = base_workflow_name + required_build_suffix
smoke_suffix = f"smoke_test_{pydistro}"
d = {
"name": f"{base_workflow_name}_{smoke_suffix}",
"requires": [required_build_name],
"python_version": python_version,
}
if filter_branch:
d["filters"] = gen_filter_branch_tree(filter_branch)
return {"smoke_test_{os_type}_{pydistro}".format(os_type=os_type, pydistro=pydistro): d}
def indent(indentation, data_list): def indent(indentation, data_list):
return ("\n" + " " * indentation).join( return ("\n" + " " * indentation).join(
yaml.dump(data_list, default_flow_style=False).splitlines()) yaml.dump(data_list, default_flow_style=False).splitlines())
......
# this Dockerfile is for torchvision smoke test, it will be created periodically via CI system
# if you need to do it locally, follow below steps once you have Docker installed
# assuming you're within the directory where this Dockerfile located
# $ docker build . -t torchvision/smoketest
# if you want to push to aws ecr, make sure you have the rights to write to ECR, then run
# $ eval $(aws ecr get-login --region us-east-1 --no-include-email)
# $ export MYTAG=localbuild ## you can choose whatever tag you like
# $ docker tag torchvision/smoketest 308535385114.dkr.ecr.us-east-1.amazonaws.com/torchvision/smoke_test:${MYTAG}
# $ docker push 308535385114.dkr.ecr.us-east-1.amazonaws.com/torchvision/smoke_test:${MYTAG}
FROM ubuntu:latest
RUN apt-get -qq update && apt-get -qq -y install curl bzip2 libsox-fmt-all \
&& curl -sSL https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o /tmp/miniconda.sh \
&& bash /tmp/miniconda.sh -bfp /usr/local \
&& rm -rf /tmp/miniconda.sh \
&& conda install -y python=3 \
&& conda update conda \
&& apt-get -qq -y remove curl bzip2 \
&& apt-get -qq -y autoremove \
&& apt-get autoclean \
&& rm -rf /var/lib/apt/lists/* /var/log/dpkg.log \
&& conda clean --all --yes
ENV PATH /opt/conda/bin:$PATH
RUN conda create -y --name python3.6 python=3.6
RUN conda create -y --name python3.7 python=3.7
RUN conda create -y --name python3.8 python=3.8
SHELL [ "/bin/bash", "-c" ]
RUN echo "source /usr/local/etc/profile.d/conda.sh" >> ~/.bashrc
RUN source /usr/local/etc/profile.d/conda.sh && conda activate python3.6 && conda install -y numpy Pillow
RUN source /usr/local/etc/profile.d/conda.sh && conda activate python3.7 && conda install -y numpy Pillow
RUN source /usr/local/etc/profile.d/conda.sh && conda activate python3.8 && conda install -y numpy Pillow
CMD [ "/bin/bash"]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment