File tree 2 files changed +60
-48
lines changed
2 files changed +60
-48
lines changed Original file line number Diff line number Diff line change
1
+ trigger :
2
+ branches :
3
+ include : ["main"]
4
+ paths :
5
+ include :
6
+ - " .azure/docker-build.yml"
7
+ - " _dockers/**"
8
+ - " _requirements/*.txt"
9
+ - " requirements.txt"
10
+
11
+ pr :
12
+ branches :
13
+ include : ["*"]
14
+ paths :
15
+ include :
16
+ - " .azure/docker-build.yml"
17
+ - " _dockers/**"
18
+ - " _requirements/*.txt"
19
+ - " requirements.txt"
20
+ exclude :
21
+ - " *.md"
22
+ - " **/*.md"
23
+
24
+ jobs :
25
+ - job : build_push
26
+ # how much time to give 'run always even if cancelled tasks' before stopping them
27
+ cancelTimeoutInMinutes : " 2"
28
+ timeoutInMinutes : " 95"
29
+ variables :
30
+ UBUNTU_VERSION : " 22.04"
31
+ CUDA_VERSION : " 12.1.1"
32
+ PYTHON_VERSION : " 3.10"
33
+ imageRepository : " pytorchlightning/tutorials"
34
+ imageTag : " ubuntu$(UBUNTU_VERSION)-cuda$(CUDA_VERSION)-py$(PYTHON_VERSION)"
35
+ pool : " lit-rtx-3090"
36
+ workspace :
37
+ clean : all
38
+ steps :
39
+ - bash : |
40
+ set -e
41
+ echo $imageTag
42
+ nvidia-smi
43
+ docker image build \
44
+ -t $(imageRepository):$(imageTag) \
45
+ -f "_dockers/ubuntu-cuda/Dockerfile" \
46
+ --build-arg UBUNTU_VERSION="$(UBUNTU_VERSION)" \
47
+ --build-arg CUDA_VERSION="$(CUDA_VERSION)" \
48
+ --build-arg PYTHON_VERSION="$(PYTHON_VERSION)" \
49
+ . --no-cache
50
+ timeoutInMinutes: "95"
51
+ displayName: "Build base image"
52
+
53
+ - bash : |
54
+ set -e
55
+ echo $(imageRepository):$(imageTag)
56
+ echo $(DOCKERHUB_PAT) | docker login --username $(DOCKERHUB_USER) --password-stdin
57
+ docker push $(imageRepository):$(imageTag)
58
+ condition: ne(variables['Build.Reason'], 'PullRequest')
59
+ timeoutInMinutes: "35"
60
+ displayName: "Push base image"
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments