-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linux Wheel builds for Manylinux1. Use alternative to actions, checkout, upload #5941
Merged
Merged
Changes from 3 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
4e360ab
Try alternative to checkout
atalman b2e130a
test
atalman 60447fd
use_same_checkout
atalman 72c77b0
refactor_setup_binary_builds
atalman fccbba7
test
atalman d62780f
fix_input+param
atalman a7303de
typo
atalman bfc9a81
fix_boolean_param
atalman 10fb3fa
fix_boolean_passing
atalman 14008c4
booleans
atalman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Binary upload action | ||
|
||
description: pull a specific docker image | ||
|
||
inputs: | ||
repository: | ||
description: 'Repository to checkout, defaults to ""' | ||
default: '' | ||
type: string | ||
trigger-event: | ||
description: "Trigger Event in caller that determines whether or not to upload" | ||
type: string | ||
default: '' | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Configure aws credentials (pytorch account) | ||
if: ${{ inputs.trigger-event == 'schedule' || (inputs.trigger-event == 'push' && startsWith(github.event.ref, 'refs/heads/nightly')) }} | ||
uses: aws-actions/configure-aws-credentials@v3 | ||
with: | ||
role-to-assume: arn:aws:iam::749337293305:role/gha_workflow_nightly_build_wheels | ||
aws-region: us-east-1 | ||
|
||
- name: Configure aws credentials (pytorch account) | ||
if: ${{ env.CHANNEL == 'test' && startsWith(github.event.ref, 'refs/tags/v') }} | ||
uses: aws-actions/configure-aws-credentials@v3 | ||
with: | ||
role-to-assume: arn:aws:iam::749337293305:role/gha_workflow_test_build_wheels | ||
aws-region: us-east-1 | ||
|
||
- name: Nightly or release RC | ||
if: ${{ inputs.trigger-event == 'schedule' || (inputs.trigger-event == 'push' && startsWith(github.event.ref, 'refs/heads/nightly')) || (env.CHANNEL == 'test' && startsWith(github.event.ref, 'refs/tags/')) }} | ||
shell: bash | ||
run: | | ||
set -ex | ||
echo "NIGHTLY_OR_TEST=1" >> "${GITHUB_ENV}" | ||
|
||
- name: Upload package to pytorch.org | ||
shell: bash | ||
working-directory: ${{ inputs.repository }} | ||
run: | | ||
set -ex | ||
|
||
# shellcheck disable=SC1090 | ||
source "${BUILD_ENV_FILE}" | ||
|
||
pip install awscli==1.32.18 | ||
|
||
AWS_CMD="aws s3 cp --dryrun" | ||
if [[ "${NIGHTLY_OR_TEST:-0}" == "1" ]]; then | ||
AWS_CMD="aws s3 cp" | ||
fi | ||
|
||
for pkg in dist/*; do | ||
${AWS_CMD} "$pkg" "${PYTORCH_S3_BUCKET_PATH}" --acl public-read | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -123,6 +123,7 @@ jobs: | |
CU_VERSION: ${{ matrix.desired_cuda }} | ||
UPLOAD_TO_BASE_BUCKET: ${{ matrix.upload_to_base_bucket }} | ||
ARCH: ${{ inputs.architecture }} | ||
IS_MANYLINUX2_28: ${{ contains(matrix.container_image, '2_28') }} | ||
name: ${{ matrix.build_name }} | ||
runs-on: ${{ matrix.validation_runner }} | ||
container: | ||
|
@@ -141,23 +142,22 @@ jobs: | |
if [[ "${{ inputs.architecture }}" = "aarch64" ]]; then | ||
rm -rf "${RUNNER_TEMP}/*" | ||
fi | ||
|
||
echo "::endgroup::" | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: atalman/checkout-action@main | ||
with: | ||
# Support the use case where we need to checkout someone's fork | ||
repository: ${{ inputs.test-infra-repository }} | ||
ref: ${{ inputs.test-infra-ref }} | ||
path: test-infra | ||
- name: Set linux aarch64 CI | ||
|
||
- name: Install Miniforge | ||
if: ${{ inputs.architecture == 'aarch64' }} | ||
shell: bash -l {0} | ||
env: | ||
DESIRED_PYTHON: ${{ matrix.python_version }} | ||
run: | | ||
set -euxo pipefail | ||
# TODO: Get rid of Conda, we already have all versions of PyThon one needs in the docker | ||
|
||
############################################################################### | ||
# Install conda | ||
# disable SSL_verify due to getting "Could not find a suitable TLS CA certificate bundle, invalid path" | ||
|
@@ -185,10 +185,12 @@ jobs: | |
repository: ${{ inputs.repository }} | ||
ref: ${{ inputs.ref }} | ||
submodules: ${{ inputs.submodules }} | ||
setup-miniconda: ${{ inputs.setup-miniconda }} | ||
setup-miniconda: false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not really required miniconda is already installed on these images now. However may need to use Install Miniforge step here for Linux as well in future |
||
python-version: ${{ env.PYTHON_VERSION }} | ||
cuda-version: ${{ env.CU_VERSION }} | ||
arch: ${{ env.ARCH }} | ||
is-manylinux2-28: ${{ env.IS_MANYLINUX2_28 }} | ||
|
||
- name: Combine Env Var and Build Env Files | ||
if: ${{ inputs.env-var-script != '' }} | ||
working-directory: ${{ inputs.repository }} | ||
|
@@ -281,7 +283,16 @@ jobs: | |
${CONDA_RUN} python "${{ inputs.repository }}/${SMOKE_TEST_SCRIPT}" | ||
fi | ||
# NB: Only upload to GitHub after passing smoke tests | ||
|
||
- name: Upload wheel | ||
if: ${{ env.IS_MANYLINUX2_28 != 'true' }} | ||
uses: ./test-infra/.github/actions/binary-upload | ||
with: | ||
repository: ${{ inputs.repository }} | ||
trigger-event: ${{ inputs.trigger-event }} | ||
|
||
- name: Upload wheel to GitHub | ||
if: ${{ env.IS_MANYLINUX2_28 == 'true' }} | ||
continue-on-error: true | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets keep both
actions/checkout@v4
andatalman/checkout-action@main
. I believe this action is run on Windows and MacOS. I see no reason to debug this on these OS's