diff --git a/.jenkins/pytorch/build.sh b/.jenkins/pytorch/build.sh index fbef26a95714..909f76182af5 100755 --- a/.jenkins/pytorch/build.sh +++ b/.jenkins/pytorch/build.sh @@ -6,6 +6,7 @@ # shellcheck disable=SC2034 COMPACT_JOB_NAME="${BUILD_ENVIRONMENT}" +echo "Compact job name: $COMPACT_JOB_NAME" source "$(dirname "${BASH_SOURCE[0]}")/common.sh" diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000000..9caaffa3af66 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,82 @@ +# Starter pipeline +# Start with a minimal pipeline that you can customize to build and deploy your code. +# Add steps that build, run tests, deploy, and more: +# https://aka.ms/yaml + +trigger: +- master + +jobs: + - job: + pool: + name: "Default" + demands: "gpu" + displayName: "Build and Test" + container: + image: pytorch.azurecr.io/tmp-lpmzxocpdogrtxhbleawtkoqukyezwwv:latest + endpoint: pytorch + options: -u 0 --runtime=nvidia + # image: 308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-cuda9-cudnn7-py3:300 + # endpoint: aws_docker + # options: -u 0 --runtime=nvidia + timeoutInMinutes: 360 + steps: + - checkout: self + submodules: "true" + clean: "all" + - bash: | + set -x + id=$(id -u) + sudo chown -R $id:$id /opt/conda + # we should probably remove the sudo -E; this is because the container user + # azure creates is not the same as the docker container owner, and chown -R'ing + # everything takes a long time. + .jenkins/pytorch/build.sh + env: + BUILD_ENVIRONMENT: pytorch-linux-xenial-cuda9-cudnn7-py3-build + SCCACHE_BUCKET: "ossci-compiler-cache-circleci-v2" + AWS_ACCESS_KEY_ID: $(SCCACHE_ACCESS_KEY_ID) + AWS_SECRET_ACCESS_KEY: $(SCCACHE_SECRET) + TORCH_CUDA_ARCH_LIST: 5.2 + displayName: 'Build' + - bash: | + set +x + set -e + export PATH="/home/suo_azpcontainer/.local/bin:$PATH" + .jenkins/pytorch/test.sh + env: + BUILD_ENVIRONMENT: pytorch-linux-xenial-cuda9-cudnn7-py3-test + USE_CUDA_DOCKER_RUNTIME: 1 + displayName: 'Test' + +# jobs: +# - job: +# pool: "Default" +# displayName: "Build and Test" +# container: +# image: 308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-trusty-py3.5:300 +# endpoint: aws_docker +# options: -u 0 +# timeoutInMinutes: 120 +# steps: +# - checkout: self +# submodules: "true" +# - bash: | +# set +x +# sudo chown -R azureuser_azpcontainer:azureuser_azpcontainer /usr/local +# sudo chown -R azureuser_azpcontainer:azureuser_azpcontainer /opt/python +# .jenkins/pytorch/build.sh +# env: +# BUILD_ENVIRONMENT: pytorch-linux-trusty-py3.5-build +# SCCACHE_BUCKET: "ossci-compiler-cache-circleci-v2" +# AWS_ACCESS_KEY_ID: $(SCCACHE_ACCESS_KEY_ID) +# AWS_SECRET_ACCESS_KEY: $(SCCACHE_SECRET) +# displayName: 'Build' +# - bash: | +# set +x +# set -e +# export PATH="/home/azureuser_azpcontainer/.local/bin:$PATH" +# .jenkins/pytorch/test.sh +# env: +# BUILD_ENVIRONMENT: pytorch-linux-trusty-py3.5-test +# displayName: 'Test'