Skip to content

Conversation

zhouzhuojie
Copy link
Contributor

@zhouzhuojie zhouzhuojie commented May 26, 2021

Add a ci-clang-tidy base docker image to speed up the CI Lint. This shortens 8mins to 4mins.

Previous docker build with PR GITHUB_TOKEN permission failed at the last step of pushing the image to github container registry, will verify if it works when merged into master

https://github.com/pytorch/test-infra/runs/2671207595?check_suite_focus=true

By default, the permissive action's default GITHUB_TOKEN should be able to write to the github container registry from master branch.

https://docs.github.com/en/actions/reference/authentication-in-a-workflow#permissions-for-the-github_token

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 26, 2021
@zhouzhuojie zhouzhuojie force-pushed the add-docker-base-push-job branch 2 times, most recently from 81b1d0e to 1ae158f Compare May 26, 2021 02:49
@zhouzhuojie zhouzhuojie marked this pull request as ready for review May 26, 2021 02:53
Copy link
Contributor

@samestep samestep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!


RUN apt-get update && apt-get upgrade -y && apt-get install -y git python3-dev python3-pip build-essential cmake clang-tidy-11 time
RUN update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-11 1000
RUN pip3 install pyyaml typing_extensions dataclasses No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit but could you add a trailing newline here? :P

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm. why didn't it failed quick check?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because this isn't in pytorch/pytorch


RUN apt-get update && apt-get upgrade -y && apt-get install -y git python3-dev python3-pip build-essential cmake clang-tidy-11 time
RUN update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-11 1000
RUN pip3 install pyyaml typing_extensions dataclasses No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm. why didn't it failed quick check?

@zhouzhuojie zhouzhuojie force-pushed the add-docker-base-push-job branch from 1ae158f to 61aa9a4 Compare May 26, 2021 16:03
@zhouzhuojie zhouzhuojie merged commit e2cfc57 into pytorch:master May 26, 2021
@zhouzhuojie zhouzhuojie deleted the add-docker-base-push-job branch May 26, 2021 16:04
facebook-github-bot pushed a commit to pytorch/pytorch that referenced this pull request May 26, 2021
Summary:
This PR introduces a docker base to speed up the `clang-tidy`'s dependencies stage. Originally I was looking into using the native github action cache, but the dependencies are spread across many apt and pip installation places, thus consolidating with a docker image might work better. It shortens the deps installation time from 4min down to 1min by pulling from docker base image.

Base image used: pytorch/test-infra#15

```
FROM nvidia/cuda:10.2-devel-ubuntu18.04

RUN apt-get update && apt-get upgrade -y
RUN apt install -y software-properties-common wget
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
RUN apt-add-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-11 main"
RUN apt-add-repository ppa:git-core/ppa

RUN apt-get update && apt-get upgrade -y && apt-get install -y git python3-dev python3-pip build-essential cmake clang-tidy-11
RUN update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-11 1000
RUN pip3 install pyyaml typing_extensions dataclasses

```

Previous successful run of clang-tidy: https://github.com/pytorch/pytorch/runs/2671193875?check_suite_focus=true

Pull Request resolved: #58964

Reviewed By: samestep

Differential Revision: D28712536

Pulled By: zhouzhuojie

fbshipit-source-id: 0c48a605efe8574c104da6a0cad1a8b7853ba35e
deniskokarev pushed a commit to deniskokarev/pytorch that referenced this pull request Jun 9, 2021
Summary:
This PR introduces a docker base to speed up the `clang-tidy`'s dependencies stage. Originally I was looking into using the native github action cache, but the dependencies are spread across many apt and pip installation places, thus consolidating with a docker image might work better. It shortens the deps installation time from 4min down to 1min by pulling from docker base image.

Base image used: pytorch/test-infra#15

```
FROM nvidia/cuda:10.2-devel-ubuntu18.04

RUN apt-get update && apt-get upgrade -y
RUN apt install -y software-properties-common wget
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
RUN apt-add-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-11 main"
RUN apt-add-repository ppa:git-core/ppa

RUN apt-get update && apt-get upgrade -y && apt-get install -y git python3-dev python3-pip build-essential cmake clang-tidy-11
RUN update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-11 1000
RUN pip3 install pyyaml typing_extensions dataclasses

```

Previous successful run of clang-tidy: https://github.com/pytorch/pytorch/runs/2671193875?check_suite_focus=true

Pull Request resolved: pytorch#58964

Reviewed By: samestep

Differential Revision: D28712536

Pulled By: zhouzhuojie

fbshipit-source-id: 0c48a605efe8574c104da6a0cad1a8b7853ba35e
jeanschmidt added a commit that referenced this pull request Sep 13, 2022
* [WIP] Major rewrite

 * Improved syntax;
 * Removed redundancy;
 * Removed unused branches of the code (including related to organization);
 * Centralized env's in a config class, so proper mocking/testing can be implemented;

files OK:
 * config.ts
 * index.ts
 * gh-auth.ts

* fixed runners.ts and improved its tests

tests files passing: gh-auth.test.ts kms/index.test.ts config.test.ts runners.test.ts

* Passing tests for scale-down

* yarn format

* rewrite of scale-up, scale-down and lambda

* rewrite of scale-up, scale-down and lambda

* fixed bugs related to installationId and secrets decrypt

Co-authored-by: Eli Uriegas <1700823+seemethere@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants