forked from livepeer/ai-worker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into merge-from-upstream
- Loading branch information
Showing
49 changed files
with
3,510 additions
and
1,524 deletions.
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
[flake8] | ||
max-line-length = 88 | ||
extend-ignore = E203,E701 | ||
per-file-ignores = | ||
__init__.py: F401 |
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,101 @@ | ||
name: Build ai-runner pipeline Docker images | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "runner/**" | ||
- "!runner/.devcontainer/**" | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- '*' | ||
paths: | ||
- "runner/**" | ||
- "!runner/.devcontainer/**" | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
sam2-docker: | ||
name: SAM2 Docker image generation | ||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'workflow_dispatch' | ||
permissions: | ||
packages: write | ||
contents: read | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Check out code | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
# Check https://github.com/livepeer/go-livepeer/pull/1891 | ||
# for ref value discussion | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
- name: Cleanup hosted runner | ||
run: | | ||
sudo apt purge -yqq dotnet-* mono-* llvm-* libllvm* powershell* openjdk-* \ | ||
temurin-* mongodb-* firefox mysql-* \ | ||
hhvm google-chrome-stable \ | ||
libgl1-mesa-dri microsoft-edge-stable azure-cli || true | ||
sudo apt autoremove -y | ||
sudo rm -rf /usr/share/dotnet /usr/local/lib/android | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.CI_DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.CI_DOCKERHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: | | ||
livepeer/ai-runner | ||
tags: | | ||
type=raw,value=sam2 | ||
type=raw,value=segment-anything-2 | ||
type=sha,prefix=sam2- | ||
type=ref,event=pr,prefix=sam2- | ||
type=ref,event=tag,prefix=sam2- | ||
type=sha,format=long,prefix=sam2- | ||
type=ref,event=branch,prefix=sam2- | ||
type=semver,pattern={{version}},prefix=sam2- | ||
type=semver,pattern={{major}}.{{minor}},prefix=sam2- | ||
type=semver,pattern={{version}},prefix=sam2-v | ||
type=semver,pattern={{major}}.{{minor}},prefix=sam2-v | ||
type=raw,value=latest,enable={{is_default_branch}},prefix=sam2- | ||
type=raw,value=${{ github.event.pull_request.head.ref }},enable=${{ github.event_name == 'pull_request' }},prefix=sam2- | ||
type=raw,value=stable,enable=${{ startsWith(github.event.ref, 'refs/tags/v') }},prefix=sam2- | ||
- name: Build and push runner docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: "{{defaultContext}}:runner" | ||
platforms: linux/amd64 | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
file: "Dockerfile" | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=registry,ref=livepeerci/build:cache | ||
cache-to: type=registry,ref=livepeerci/build:cache,mode=max | ||
|
||
- name: Build and push runner docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: "{{defaultContext}}:runner" | ||
platforms: linux/amd64 | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
file: "docker/Dockerfile.segment_anything_2" | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=registry,ref=livepeerci/build:cache | ||
cache-to: type=registry,ref=livepeerci/build:cache,mode=max |
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 |
---|---|---|
|
@@ -5,5 +5,5 @@ codegen: | |
go run github.com/deepmap/oapi-codegen/v2/cmd/[email protected] \ | ||
-package worker \ | ||
-generate types,client,chi-server,spec \ | ||
runner/openapi.json \ | ||
runner/openapi.yaml \ | ||
| awk '!/WARNING/' > worker/runner.gen.go |
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
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
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
Oops, something went wrong.