Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
pytorch/.github/workflows/docker-release.yml at master · ragulpr/pytorch · GitHub
Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
See all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
ragulpr
pytorch
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
pytorch
/
.github
/
workflows
/
docker-release.yml
Copy path
View runs
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
112 lines (107 loc) · 4.46 KB
master
Breadcrumbs
pytorch
/
.github
/
workflows
/
docker-release.yml
Copy path
Top
File metadata and controls
Code
Blame
112 lines (107 loc) · 4.46 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name
:
Build Official Docker Images
on
:
workflow_dispatch
:
pull_request
:
paths
:
-
Dockerfile
-
docker.Makefile
-
.github/workflows/docker-release.yml
push
:
branches
:
-
nightly
tags
:
#
Release candidate tags look like: v1.11.0-rc1
-
v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+
-
ciflow/nightly/*
concurrency
:
group
:
${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
cancel-in-progress
:
true
env
:
BUILD_PROGRESS
:
plain
BUILD_TYPE
:
official
DOCKER_ORG
:
pytorch
DOCKER_REGISTRY
:
ghcr.io
NO_BUILD_SUFFIX
:
true
USE_BUILDX
:
1
WITH_PUSH
:
${{ github.event_name == 'push' && (github.event.ref == 'refs/heads/nightly' || (startsWith(github.event.ref, 'refs/tags/') && !startsWith(github.event.ref, 'refs/tags/ciflow/'))) }}
jobs
:
build
:
if
:
${{ github.repository == 'pytorch/pytorch' }}
runs-on
:
[self-hosted, linux.2xlarge]
timeout-minutes
:
240
strategy
:
matrix
:
include
:
#
nvidia specific images don't exist for arm64 so only build the runtime image
-
image_type
:
runtime
platform
:
linux/arm64,linux/amd64
-
image_type
:
devel
platform
:
linux/amd64
env
:
BUILD_IMAGE_TYPE
:
${{ matrix.image_type }}
BUILD_PLATFORMS
:
${{ matrix.platform }}
steps
:
-
name
:
Setup SSH (Click me for login details)
uses
:
pytorch/test-infra/.github/actions/setup-ssh@main
with
:
github-secret
:
${{ secrets.GITHUB_TOKEN }}
#
[see note: pytorch repo ref]
#
deep clone (fetch-depth 0) required for git merge-base
-
name
:
Checkout PyTorch
uses
:
actions/checkout@v3
with
:
fetch-depth
:
0
submodules
:
'
recursive
'
-
name
:
Setup Linux
uses
:
./.github/actions/setup-linux
-
name
:
Login to GitHub Container Registry
if
:
${{ env.WITH_PUSH == 'true' }}
uses
:
docker/login-action@v2
with
:
registry
:
ghcr.io
username
:
pytorch
password
:
${{ secrets.GHCR_PAT }}
#
Setup multi-arch image builds
-
name
:
Set up QEMU
uses
:
docker/setup-qemu-action@v2
env
:
QEMU_BINARY_PATH
:
${{ runner.temp }}/bin
-
name
:
Set up Docker Buildx
uses
:
docker/setup-buildx-action@v2
with
:
version
:
v0.10.0
-
name
:
Setup job specific variables
run
:
|
set -eou pipefail
# To get QEMU binaries in our PATH
echo "${RUNNER_TEMP}/bin" >> "${GITHUB_PATH}"
# Generate PyTorch version to use
echo "PYTORCH_VERSION=$(python3 .github/scripts/generate_pytorch_version.py)" >> "${GITHUB_ENV}"
-
name
:
Setup nightly specific variables
if
:
${{ github.event.ref == 'refs/heads/nightly' || startsWith(github.event.ref, 'refs/tags/ciflow/nightly/') }}
run
:
|
{
echo "DOCKER_IMAGE=pytorch-nightly";
echo "INSTALL_CHANNEL=pytorch-nightly";
echo "TRITON_VERSION=$(cut -f 1 .ci/docker/triton_version.txt)+$(cut -c -10 .ci/docker/ci_commit_pins/triton.txt)";
} >> "${GITHUB_ENV}"
-
name
:
Run docker build / push
#
WITH_PUSH is used here to determine whether or not to add the --push flag
run
:
|
make -f docker.Makefile "${BUILD_IMAGE_TYPE}-image"
-
name
:
Push nightly tags
if
:
${{ github.event.ref == 'refs/heads/nightly' && matrix.image_type == 'runtime' }}
run
:
|
PYTORCH_DOCKER_TAG="${PYTORCH_VERSION}-runtime"
CUDA_VERSION=$(python3 -c "import re;print(re.search('CUDA_VERSION\s+=\s+([0-9\.]+)',open('docker.Makefile').read())[1],end='')")
PYTORCH_NIGHTLY_COMMIT=$(docker run ghcr.io/pytorch/pytorch-nightly:"${PYTORCH_DOCKER_TAG}" \
python -c 'import torch; print(torch.version.git_version[:7],end="")')
docker tag ghcr.io/pytorch/pytorch-nightly:"${PYTORCH_DOCKER_TAG}" \
ghcr.io/pytorch/pytorch-nightly:"${PYTORCH_NIGHTLY_COMMIT}-cu${CUDA_VERSION}"
docker push ghcr.io/pytorch/pytorch-nightly:"${PYTORCH_NIGHTLY_COMMIT}-cu${CUDA_VERSION}"
docker tag ghcr.io/pytorch/pytorch-nightly:"${PYTORCH_NIGHTLY_COMMIT}-cu${CUDA_VERSION}" \
ghcr.io/pytorch/pytorch-nightly:latest
docker push ghcr.io/pytorch/pytorch-nightly:latest
-
name
:
Teardown Linux
uses
:
pytorch/test-infra/.github/actions/teardown-linux@main
if
:
always()
You can’t perform that action at this time.