Skip to content
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

Mh/logging #3182

Closed
wants to merge 222 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
222 commits
Select commit Hold shift + click to select a range
3ede48f
server: Add unimplemented AI handler
yondonfu Jan 15, 2024
6f29698
multi: Add /text-to-image for O
yondonfu Jan 17, 2024
e2735cd
core+server: Add /image-to-image to O
yondonfu Jan 17, 2024
8883824
core+server: Add /image-to-video for O
yondonfu Jan 17, 2024
92bfa74
multi: Transcode PNG -> mp4 for image-to-video
yondonfu Jan 21, 2024
be72c37
server: Impl B -> O image-to-video
yondonfu Jan 21, 2024
7cd7913
server: Impl B -> O text-to-image
yondonfu Jan 21, 2024
abe1b5a
server: Set Content-Type header on B /image-to-video
yondonfu Jan 21, 2024
7ec59b3
server: Impl B -> O image-to-image
yondonfu Jan 22, 2024
1822db5
mod: Bump go-tools to v0.3.5
yondonfu Jan 22, 2024
52785b2
server: Upload to OS for all AI endpoints
yondonfu Jan 22, 2024
332ecbd
mod: Bump ai-worker + go-tools
yondonfu Jan 23, 2024
14deb6a
cmd: Add -aiModels to load models
yondonfu Jan 23, 2024
289cb49
server: Log oapi validation error
yondonfu Jan 23, 2024
48f560c
temp disable CI tests
yondonfu Jan 24, 2024
24c1623
ci+docker: Use go1.21.5
yondonfu Jan 24, 2024
d60b801
docker: Install zlib
yondonfu Jan 24, 2024
b49d503
temp disable CI arm64 builds
yondonfu Jan 24, 2024
27c8da1
cmd: Use livepeer/ai-runner image ID
yondonfu Jan 24, 2024
0adf0b6
cmd: Create models dir if DNE
yondonfu Jan 24, 2024
d894ee8
cmd: Add -aiModelsDir flag
yondonfu Jan 25, 2024
d1af6e2
server: Log HTTP errors for AI endpoints
yondonfu Jan 25, 2024
1759f35
server: Add AI process logs for O
yondonfu Jan 25, 2024
e089c10
mod+cmd: Bump ai-worker
yondonfu Jan 25, 2024
857ee5f
server: Check JSON200 from O
yondonfu Jan 26, 2024
3fcc300
server: Temp disable oapi validation
yondonfu Jan 26, 2024
d6d4261
mod: Bump ai-worker
yondonfu Jan 26, 2024
19da59d
mod+server: Prefer: respond-async for image-to-video
yondonfu Jan 30, 2024
7d765d6
server: Fix error check in ImageToVideo
yondonfu Jan 31, 2024
9985d5f
server: Fix JSON for ImageToVideoResult.Error
yondonfu Feb 1, 2024
2ecaaab
mod: Bump ai-worker
yondonfu Feb 1, 2024
dafefd1
server: Add error struct for AI endpoints
yondonfu Feb 1, 2024
c35735c
server: Add backoff for AI requests
yondonfu Feb 1, 2024
9521fcb
mod: Bump ai-worker
yondonfu Feb 5, 2024
9f5792a
server: Read errors from O for AI requests
yondonfu Feb 5, 2024
924c712
server: Use multipart writer helpers for AI reqs
yondonfu Feb 5, 2024
209ec48
mod+server: Add seed in AI responses
yondonfu Feb 8, 2024
04c751c
multi: Support specifying external containers
yondonfu Feb 13, 2024
9f47d4e
multi: Pass bearer token to runners
yondonfu Feb 13, 2024
0b31700
mod: Bump livepeer/ai-worker
yondonfu Feb 14, 2024
c5427d7
mod: Bump livepeer/ai-worker
yondonfu Feb 14, 2024
5e73dcb
multi: Model cap constraints + multi-O for text-to-image
yondonfu Feb 16, 2024
c22f398
multi: Multi-O for image-to-image
yondonfu Feb 19, 2024
579a31d
multi: Multi-O for image-to-video
yondonfu Feb 19, 2024
f82c014
mod: Bump livepeer/ai-worker
yondonfu Feb 20, 2024
a61818b
core: Fix resolution for image-to-video
yondonfu Feb 20, 2024
3d77eed
server: Fix service unavailable error image-to-video
yondonfu Feb 20, 2024
f2bc443
core: Use software transcoder for image-to-video
yondonfu Feb 25, 2024
8cc7430
server: Return 503 if no Os have cap
yondonfu Feb 27, 2024
f583d93
server: Add AISessionManager
yondonfu Mar 11, 2024
e122757
cmd: Use abs path for default model dir
yondonfu Mar 13, 2024
a2b194e
server: Remove check for deprecated seg data profiles
yondonfu Mar 13, 2024
13f5637
server: Payments for text-to-image
yondonfu Mar 13, 2024
a77f0a0
server: Payments + session manager for all AI caps
yondonfu Mar 14, 2024
f8ef935
multi: Support price per AI cap
yondonfu Mar 14, 2024
0e4d35a
core: Default transcode max price
yondonfu Mar 14, 2024
f698708
server: Use frame count for out pixels
yondonfu Mar 15, 2024
bd12e99
server: Re-use session logic for AI
yondonfu Mar 20, 2024
a818a61
docs(ai): add AI subnet orch setup guide
rickstaa Mar 25, 2024
b3fdf31
docs(ai): add ai subnet broadcaster instructions
rickstaa Mar 25, 2024
f13b8b0
docs(ai): enhance AI Subnet documentation with binary installation guide
rickstaa Mar 25, 2024
43f4166
docs(ai): improve ai subnet documentation
rickstaa Mar 27, 2024
be3afe8
docs(ai): fix broken huggingface documentation link
rickstaa Mar 27, 2024
c7130b4
docs(ai): fix broken 'dl_checkpoint' command
rickstaa Mar 27, 2024
732bf36
docs(ai): enhance clarity and accuracy of AI subnet docs
rickstaa Mar 28, 2024
6895dca
docs(ai): improve model configuration documentation
rickstaa Mar 28, 2024
a8346e4
docs(ai): add instructions for on-chain configuration of AI Subnet Or…
rickstaa Mar 28, 2024
f5bb8c2
docs(ai): improve AI on-chain instructions
rickstaa Mar 28, 2024
16edc6e
docs(ai): improve ai docs syntax
rickstaa Mar 28, 2024
3a14fb1
Merge pull request #2987 from livepeer/improve_ai_docs_text
rickstaa Mar 28, 2024
07ec545
docs(ai): add promtail metrics sending docs
rickstaa Mar 28, 2024
bced6be
docs(ai): update volume mount config for promtail
rickstaa Mar 28, 2024
5e26f41
docs(ai): name docker containers
rickstaa Mar 29, 2024
77b9a48
docs(ai): add promtail metrics sending docs
rickstaa Apr 5, 2024
ab40d04
docs(ai): improve models config descriptiona and add `ticketEV` param
rickstaa Apr 5, 2024
aa706dc
docs(ai): improve cli description and remove redeemer method
rickstaa Apr 5, 2024
0e6be96
docs(ai): add command outputs
rickstaa Apr 5, 2024
9db7a1b
docs(ai): add AI subnet orch setup guide
rickstaa Apr 8, 2024
0ed61b8
ci(ai): add AI issue templates
rickstaa Apr 13, 2024
f76726d
ci(ai): add AI pull request labeler
rickstaa Apr 13, 2024
065edbc
ci: change issue template order
rickstaa Apr 15, 2024
1019d42
ci(ai): add PR labeler config file
rickstaa Apr 15, 2024
af6186f
ci(ai): fix incorrect labels
rickstaa Apr 15, 2024
51406be
ci: rename labeler and remove trailing whitespace
rickstaa Apr 16, 2024
9502ea0
feat(ai): add pipelines optimization flags (#3013)
rickstaa Apr 16, 2024
cea4e94
docs(ai): add optimization flags to docs (#3014)
rickstaa Apr 16, 2024
bc629b7
ci(ai): temporary change build action branch to ai-video
rickstaa Apr 16, 2024
6aa0b00
ci(ai): temporary change docker action branch to ai-video
rickstaa Apr 16, 2024
cecd3a5
ci(ai): fix pull request config warning (#3018)
rickstaa Apr 18, 2024
2a782ed
fix: flush writer when encoding AI results (fix invalid PNG) (#3020)
stronk-dev Apr 18, 2024
e1db239
ci(ai): add myself as branch CODE OWNER
rickstaa Apr 18, 2024
1643a1e
ci(ai): run labeler also on 'pull_request_target'
rickstaa Apr 18, 2024
5bb92fa
ci(ai): cleanup labeler actions
rickstaa Apr 18, 2024
23fdfcb
ci(ai): auto assign AI issues and feature requests
rickstaa Apr 18, 2024
e9258f3
feat(ai): enable AI orchestrator discovery (#3004)
rickstaa Apr 18, 2024
bfccbc4
refactor(ai): add extra devtool input arguments (#3026)
rickstaa Apr 20, 2024
865314d
chore: improve devtool documentation and add scripts
rickstaa Apr 20, 2024
ea82cde
refactor: log advertised capabilities and price on startup (#3031)
eliteprox Apr 24, 2024
93caa3b
feat(ai): enforce 'aiModels' flag requirement (#3032)
rickstaa Apr 24, 2024
bbda633
fix(ai): improve AI selection algorithm (#3030)
rickstaa May 2, 2024
72dced7
refactor(ai): improve orch select retry ctx logic (#3039)
rickstaa May 3, 2024
6fc1afd
refactor(ai): improve orch retry timeout msg
rickstaa May 3, 2024
a0448d4
fix(ai): prevent insufficient capacity payments (#3035)
rickstaa May 3, 2024
fb9764b
ci(ai): add temporary ai-video latest binary url upload
rickstaa May 4, 2024
40a40a5
chore(ai): remove temporary AI subnet docs
rickstaa May 4, 2024
ebd5045
fix(ai): fix infinite loop when no Os are found (#3042)
rickstaa May 4, 2024
dfb4320
feat(ai): Enhance orchestrator selection by incorporating latency (#3…
rickstaa May 6, 2024
45cf167
chore(ai): update 'ai-worker' dependency
rickstaa May 13, 2024
180041d
feat: add '-gateway' and deprecate '-broadcaster' (#3048)
eliteprox May 13, 2024
c18d325
feat: remove -pricePerUnit requirement for -aiWorker flag (#3047)
eliteprox May 13, 2024
ee787ea
perf(ai): update ai-worker to enable DEEPCACHE optimization
rickstaa May 14, 2024
d5f5e1c
chore: fix Mockgen dependency error
rickstaa May 15, 2024
62acd4a
ci(ai): ensure docker builder is build and pushed
rickstaa May 15, 2024
816920a
feat(ai): enable NSFW safety filter (#3054)
rickstaa May 15, 2024
fc51f04
chore(ai): update ai-worker version
rickstaa May 17, 2024
f9aa0c1
ci(ai): ensure livepeer builder builds on AI version tags
rickstaa May 17, 2024
9584c3c
fix: apply runner nil error fix (#3058)
rickstaa May 17, 2024
add7368
refactor(census): rename Broadcaster metrics to Gateway (#3055)
rickstaa May 16, 2024
35db3f2
refactor: add -pricePerGateway and deprecate -pricePerBroadcaster (#3…
rickstaa May 20, 2024
55185db
ci: Protect Docker 'stable' tag
rickstaa May 20, 2024
2b8478d
ci: fix syntax error in Docker action tags
rickstaa May 20, 2024
03b64fb
fix(ai): fix runtime error in aiWorker when pricePerUnit is unset (#3…
eliteprox May 20, 2024
b7a9fb7
fix(ai): fix cli prices nil error (#3063)
rickstaa May 20, 2024
6843eda
feat: add -aiRunnerImage flag to pin docker image ver (#3064)
eliteprox May 21, 2024
4382fbe
chore(ai): update ai-worker dependency
rickstaa May 21, 2024
570a00b
ci(docker): ensure stable tag is created on master branch
rickstaa May 29, 2024
aa8ae45
feat: ai video add safety check to image to video 2 (#3071)
rickstaa May 31, 2024
6159a84
chore(ai): update ai-worker version
rickstaa Jun 4, 2024
bd34a1d
chore(ai): update ai-worker to v0.0.5
rickstaa Jun 4, 2024
6f9426b
chore(ai): update ai-worker to latest version
rickstaa Jun 4, 2024
6535844
feat(ai): account for num_inference_steps inT2I latency inference sco…
rickstaa Jun 5, 2024
0d51a78
chore(ai): update to latest ai-worker
rickstaa Jun 10, 2024
b2933cf
feat(ai): add upscaling pipeline (#3077)
rickstaa Jun 10, 2024
f2c9bb6
chore: update Image2Image and Upscale OS storage to use requestID sim…
ad-astra-video Jul 4, 2024
29d4603
fix(ai): account for number of images in I2I latency score (#3093)
rickstaa Jul 8, 2024
4825d68
feat(ai): add 'num_inference_steps' to I2I,I2V and upscale pipeliens …
rickstaa Jul 17, 2024
2ab10c6
feat: add audio-to-text pipeline (#3078)
eliteprox Jul 17, 2024
f60c0c5
feat(ai): add AI gateway metrics (#3087)
rickstaa Jul 17, 2024
82292c9
feat(ai): add A2T gateway metrics (#3100)
rickstaa Jul 18, 2024
5aadffb
feat(ai): add AI orchestrator metrics (#3097)
rickstaa Jul 18, 2024
87c24a2
ci(ai): improve ci comments
rickstaa Jul 24, 2024
498eb76
Merge branch 'master' into ai-video-rebase
rickstaa Jul 25, 2024
c00361a
Merge branch 'master' into ai-video-rebase
rickstaa Jul 27, 2024
21f98a5
chore(ai): ensure ai-video-rebased ffmpeg file is used
rickstaa Jul 27, 2024
280b4a5
chore(ai): remove local go module dependency
rickstaa Jul 27, 2024
30641d2
test: fix capability tests (#3107)
rickstaa Jul 29, 2024
01fc75b
test: fix broadcast test
rickstaa Jul 29, 2024
ed8c0a4
test: fix broadcast test
rickstaa Jul 29, 2024
6292df1
feat(ai): add dynamic pricePerUnit feature to AI pricing
rickstaa Jul 29, 2024
71089b3
feat(ai): add minLivepeerVersion constraint and IgnorePreReleaseVersions
rickstaa Jul 31, 2024
2f95332
fix(ai): fix offchain 'PriceFeedWatcher is not initialized' error
rickstaa Jul 31, 2024
74a84bc
test: add pre-release suffix min version tests
rickstaa Jul 31, 2024
09e7ea5
feat: simplify pre-release version filter logic
rickstaa Jul 31, 2024
5c98592
feat: allow Gateways to filter by pre-release
rickstaa Jul 31, 2024
54142eb
Merge branch 'ai-video' into ai-video-rebase
rickstaa Jul 31, 2024
340256a
Merge branch 'master' into ai-video-rebase
rickstaa Jul 31, 2024
d64f378
refactor(ai): rename capability constraint variable
rickstaa Jul 31, 2024
bac48c5
cmd: Use `-gateway` consistently
j0sh Jul 25, 2024
b2c20a5
Merge branch 'ai-video' into ai-video-rebase
rickstaa Jul 31, 2024
bd55cd2
chore(ai): remove lpms local dependency
rickstaa Jul 31, 2024
8c6bd5c
chore(ai): update lpms dependency
rickstaa Jul 31, 2024
95c3b6d
feat: remove AI specific minVersion constraint logic
rickstaa Aug 1, 2024
4c4b1b6
feat(ai): Add AI suffix handling for min version logic
rickstaa Aug 1, 2024
8036856
core: Make the AI config take a big rat
victorges Aug 1, 2024
8e654d7
fix: add AIModels currency config field and fix pixelsPerUnit handling
rickstaa Aug 2, 2024
3ff8e74
fix(ai): temporarily disable arm64 builds
rickstaa Aug 2, 2024
9cdeeb5
fix(ai): temporarily disable arm64 builds
rickstaa Aug 2, 2024
c2da0bd
chore: merge master into ai-video (#3103)
rickstaa Aug 7, 2024
e9b1410
Revert "chore: merge master into ai-video (#3103)" (#3123)
rickstaa Aug 7, 2024
016259f
Merge pull request #3122 from livepeer/ai-video-rebase
rickstaa Aug 7, 2024
c336dd1
Merge pull request #3124 from livepeer/master
rickstaa Aug 7, 2024
350556d
refactor: improve rpc message (#3115)
rickstaa Aug 9, 2024
35927af
chore: update lpms dependency to master branch (#3125)
rickstaa Aug 10, 2024
27f1bb0
Ai 303/pricing multiple images t2i i2i (#3126)
pschroedl Aug 14, 2024
7641069
fix(ai): fix unsupported capability nil error (#3132)
rickstaa Aug 15, 2024
f50071e
Merge branch 'master' into ai-video
rickstaa Aug 15, 2024
423d6c8
refactor(ai): fixes a small merge conflict
rickstaa Aug 15, 2024
c497cf8
ci(ai): disable windows binary build
rickstaa Aug 15, 2024
0b6f600
refactor: remove unused build script
rickstaa Aug 15, 2024
2c57642
ci: prevent build residual files
rickstaa Aug 15, 2024
8294269
ci: reset permissions in build action
rickstaa Aug 15, 2024
85e09f3
ci: temporarily run upload job as root
rickstaa Aug 16, 2024
e08f078
ci: fix broken binary upload action
rickstaa Aug 16, 2024
815b981
chore: revert build ci fixes
rickstaa Aug 16, 2024
bd0c70a
workflows: Revert to ubuntu-20 to stop selecting self-hosted runners
hjpotter92 Aug 16, 2024
2a3f832
Merge branch 'master' into ai-video
rickstaa Aug 16, 2024
200e145
ci: add protoc build dependencies (#3139)
rickstaa Aug 16, 2024
0ae26d3
ci(ai): add temporary ai-video latest binary url upload (#3142)
rickstaa Aug 16, 2024
c229c2a
fix(ai): handle missing pricePerUnit in AIConfig (#3141)
rickstaa Aug 16, 2024
09a9ab0
chore(ai): update AI release version
rickstaa Aug 19, 2024
60e082e
ci(ai): ensure latest tag ai release (#3143)
rickstaa Aug 19, 2024
d55426b
chore(ai): release v0.7.6-ai.1
rickstaa Aug 19, 2024
0fe1c21
ci(ai): improve latest release binary ci logic
rickstaa Aug 20, 2024
d162ce7
ci(ai): temporary simplify build action for tests
rickstaa Aug 20, 2024
9ec1e05
ci: add temp condition print
rickstaa Aug 20, 2024
42b7c85
ci(ai): add latest tag check into build publish job
rickstaa Aug 20, 2024
c6f42a2
fixup! ci(ai): add latest tag check into build publish job
rickstaa Aug 20, 2024
ea75b75
fixup! fixup! ci(ai): add latest tag check into build publish job
rickstaa Aug 20, 2024
a07c38e
fixup! fixup! fixup! ci(ai): add latest tag check into build publish job
rickstaa Aug 20, 2024
5af4bbd
Merge branch 'master' into ai-video
rickstaa Aug 20, 2024
9397d80
chore: update to version 0.7.7-ai.1
rickstaa Aug 20, 2024
b51577e
ci(ai): enable mac and linux builds
rickstaa Aug 20, 2024
c05f23c
ci(ai): cleanup build action (#3147)
rickstaa Aug 20, 2024
33eed89
ci(ai): improve build ci doc comment
rickstaa Aug 20, 2024
f5c754e
chore(ai): release version v0.7.7-ai.3
rickstaa Aug 20, 2024
4f3947d
feat(pricing): expand gateway max price to set per capability/model i…
ad-astra-video Aug 23, 2024
d4e4b6d
chore(ai): release version v0.7.7-ai.4
rickstaa Aug 23, 2024
ca2f2c5
Merge branch 'master' into ai-video
rickstaa Aug 23, 2024
b5d351f
chore(ai): release version v0.7.8-ai.1
rickstaa Aug 23, 2024
a4116f7
refactor(ai): apply small code improvement (#3152)
rickstaa Aug 23, 2024
54b4de2
refactor(ai): remove redundant comment (#3153)
rickstaa Aug 23, 2024
3316e35
feat(ai): add segment anything 2 pipeline image version(#3131)
pschroedl Sep 4, 2024
1bae87e
chore(ai): release 0.7.8-ai.2
rickstaa Sep 4, 2024
c5f5a11
fix(ai): update SAM2 capability description to only upper case first …
ad-astra-video Sep 11, 2024
e01daa2
chore(ai): update ai-worker
rickstaa Sep 13, 2024
14f7783
Revert "chore(ai): update ai-worker"
rickstaa Sep 13, 2024
ffb1922
refactor: update worker classes (#3171)
rickstaa Sep 13, 2024
71a2dcf
print error message on gateway for bad request lora errors (#3154)
eliteprox Sep 23, 2024
9c20ce8
Merge branch 'master' into ai-video
rickstaa Sep 23, 2024
8dd8a88
Merge branch 'master' into ai-video
rickstaa Sep 23, 2024
d1b4dec
fix(ai): selection algorithm transcoding conflict patch (#3181)
rickstaa Sep 23, 2024
9ab2a5a
Better messages for objectStore errors
mjh1 Sep 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Default reviewers for the `ai-video` branch.
# TODO: Change if merged into `master` branch.
* @rickstaa
68 changes: 51 additions & 17 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ on:
pull_request:
push:
branches:
- master
# - master
- ai-video
tags:
- "v*"

Expand All @@ -29,25 +30,25 @@ jobs:
container: ubuntu:20.04
type: cpu

- GOOS: linux
GOARCH: arm64
container: ubuntu:20.04
type: cpu
# - GOOS: linux
# GOARCH: arm64
# container: ubuntu-20.04
# type: cpu

- GOOS: linux
GOARCH: amd64
container: livepeerci/cuda:12.0.0-cudnn8-devel-ubuntu20.04
type: gpu

- GOOS: linux
GOARCH: arm64
container: livepeerci/cuda:12.0.0-cudnn8-devel-ubuntu20.04
type: gpu
# - GOOS: linux
# GOARCH: arm64
# container: livepeerci/cuda:12.0.0-cudnn8-devel-ubuntu20.04
# type: gpu

- GOOS: windows
GOARCH: amd64
container: ubuntu:22.04
type: cpu
# - GOOS: windows
# GOARCH: amd64
# container: ubuntu:22.04
# type: cpu

steps:
- name: Setup ubuntu container
Expand All @@ -69,7 +70,7 @@ jobs:
id: go
uses: actions/setup-go@v5
with:
go-version: 1.20.4
go-version: 1.21.5
cache: true
cache-dependency-path: go.sum

Expand Down Expand Up @@ -100,7 +101,8 @@ jobs:
&& apt update \
&& apt -yqq install \
nasm clang-14 clang-tools-14 lld-14 build-essential pkg-config autoconf git python3 \
gcc-mingw-w64 libgcc-9-dev-arm64-cross mingw-w64-tools gcc-mingw-w64-x86-64
gcc-mingw-w64 libgcc-9-dev-arm64-cross mingw-w64-tools gcc-mingw-w64-x86-64 \
golang-goprotobuf-dev protobuf-compiler-grpc

update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 30 \
&& update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 30 \
Expand Down Expand Up @@ -170,7 +172,7 @@ jobs:
id: go
uses: actions/setup-go@v5
with:
go-version: 1.20.4
go-version: 1.21.5
cache: true
cache-dependency-path: go.sum

Expand Down Expand Up @@ -212,7 +214,7 @@ jobs:
id: match-tag
with:
text: ${{ github.ref_name }}
regex: '^(master|main|v[0-9]+\.\d+\.\d+)$'
regex: '^(master|main|ai-video|v[0-9]+\.\d+\.\d+)$'

- name: Codesign and notarize binaries
if: steps.match-tag.outputs.match != '' && matrix.target.GOOS == 'darwin'
Expand Down Expand Up @@ -316,6 +318,38 @@ jobs:
parent: false
process_gcloudignore: false

# Get the latest release tag
- name: Get latest tag
id: get-latest-tag
run: |
git fetch --tags
latest_tag=$(git tag -l "v*" | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+-ai.[0-9]+$' | sort -V | tail -n 1)
echo "latest_tag=$latest_tag" >> $GITHUB_OUTPUT
echo "Latest tag: $latest_tag"
echo "GitHub Ref: ${{ github.ref }}"

# Update the latest release
- name: Upload release archives to Google Cloud stable folder
id: upload-archives-latest
if: ${{ github.ref == format('refs/tags/{0}', steps.get-latest-tag.outputs.latest_tag) }}
uses: google-github-actions/upload-cloud-storage@v2
with:
path: "releases"
destination: "build.livepeer.live/${{ github.event.repository.name }}/ai-video/stable"
parent: false
process_gcloudignore: false

# Update the latest branch manifest
- name: Upload branch manifest file to Google Cloud stable folder
id: upload-manifest-latest
if: ${{ github.ref == format('refs/tags/{0}', steps.get-latest-tag.outputs.latest_tag) }}
uses: google-github-actions/upload-cloud-storage@v2
with:
path: ${{ steps.branch-manifest.outputs.manifest-file }}
destination: "build.livepeer.live/${{ github.event.repository.name }}/ai-video/stable"
parent: false
process_gcloudignore: false

- name: Trigger discord webhook
shell: bash
env:
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ on:
pull_request:
push:
branches:
- master
# - master
- ai-video
tags:
- "v*"

Expand Down Expand Up @@ -89,7 +90,8 @@ jobs:
build-args: |
BUILD_TAGS=${{ steps.build-tag.outputs.build-tags }}
context: .
platforms: linux/amd64, linux/arm64
# platforms: linux/amd64, linux/arm64 # NOTE: Arm64 not yet supported.
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
file: "docker/Dockerfile"
Expand Down Expand Up @@ -126,7 +128,7 @@ jobs:
id: match-tag
with:
text: ${{ github.ref_name }}
regex: '^(main|master|v[0-9]+\.\d+\.\d+)$'
regex: '^(main|master|ai-video|v[0-9]+\.\d+\.\d+|v[0-9]+\.\d+\.\d+-ai-video-\d+)'

- name: Get build tags
id: build-tag
Expand Down Expand Up @@ -177,7 +179,8 @@ jobs:
build-args: |
BUILD_TAGS=${{ steps.build-tag.outputs.build-tags }}
context: .
platforms: linux/amd64, linux/arm64
# platforms: linux/amd64, linux/arm64 # NOTE: Arm64 not yet supported.
platforms: linux/amd64
push: true
tags: ${{ steps.meta-builder.outputs.tags }}
file: "docker/Dockerfile"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Trigger test suite

on:
pull_request:
branches:
- master
# pull_request:
# branches:
# - master
push:
branches:
- master
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
id: go
uses: actions/setup-go@v5
with:
go-version: 1.20.4
go-version: 1.21.5
cache: true
cache-dependency-path: go.sum

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
*.dll
*.so
*.dylib

# IDE files
*.vscode
*.code-workspace

# Test binary, build with `go test -c`
*.test
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.7.9
0.7.9-ai.1
102 changes: 102 additions & 0 deletions ai/file_worker.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
package ai

import (
"context"
"encoding/json"
"errors"
"os"

"github.com/livepeer/ai-worker/worker"
)

type FileWorker struct {
files map[string]string
}

func NewFileWorker(files map[string]string) *FileWorker {
return &FileWorker{files: files}
}

func (w *FileWorker) TextToImage(ctx context.Context, req worker.GenTextToImageJSONRequestBody) (*worker.ImageResponse, error) {
fname, ok := w.files["text-to-image"]
if !ok {
return nil, errors.New("text-to-image response file not found")
}

data, err := os.ReadFile(fname)
if err != nil {
return nil, err
}

var resp worker.ImageResponse
if err := json.Unmarshal(data, &resp); err != nil {
return nil, err
}

return &resp, nil
}

func (w *FileWorker) ImageToImage(ctx context.Context, req worker.GenImageToImageMultipartRequestBody) (*worker.ImageResponse, error) {
fname, ok := w.files["image-to-image"]
if !ok {
return nil, errors.New("image-to-image response file not found")
}

data, err := os.ReadFile(fname)
if err != nil {
return nil, err
}

var resp worker.ImageResponse
if err := json.Unmarshal(data, &resp); err != nil {
return nil, err
}

return &resp, nil
}

func (w *FileWorker) ImageToVideo(ctx context.Context, req worker.GenImageToVideoMultipartRequestBody) (*worker.VideoResponse, error) {
fname, ok := w.files["image-to-video"]
if !ok {
return nil, errors.New("image-to-video response file not found")
}

data, err := os.ReadFile(fname)
if err != nil {
return nil, err
}

var resp worker.VideoResponse
if err := json.Unmarshal(data, &resp); err != nil {
return nil, err
}

return &resp, nil
}

func (w *FileWorker) Upscale(ctx context.Context, req worker.GenUpscaleMultipartRequestBody) (*worker.ImageResponse, error) {
fname, ok := w.files["upscale"]
if !ok {
return nil, errors.New("upscale response file not found")
}

data, err := os.ReadFile(fname)
if err != nil {
return nil, err
}

var resp worker.ImageResponse
if err := json.Unmarshal(data, &resp); err != nil {
return nil, err
}

return &resp, nil
}

func (w *FileWorker) Warm(ctx context.Context, containerName, modelID string) error {
return nil
}

func (w *FileWorker) Stop(ctx context.Context, containerName string) error {
return nil
}
29 changes: 20 additions & 9 deletions cmd/devtool/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,42 @@

An on-chain workflow testing tool that supports the following:

- Automatically submitting the necessary setup transactions for each node type
- Generating a Bash script with default CLI flags to start each node type
- Automatically submitting the necessary setup transactions for each node type
- Generating a Bash script with default CLI flags to start each node type

## Prerequisites

## Step 1: Set up a private ETH network with Livepeer protocol deployed
- [Docker](https://docs.docker.com/get-docker/)
- [Go](https://golang.org/doc/install)
- [Go-livepeer](https://github.com/livepeer/go-livepeer) build from source (see [the docs](https://docs.livepeer.org/orchestrators/guides/install-go-livepeer#build-from-source)).

```
## Setting Up an On-Chain Development Environment

### Step 1: Set up a private ETH network with Livepeer protocol deployed

```bash
docker pull livepeer/geth-with-livepeer-protocol:confluence
docker run -p 8545:8545 -p 8546:8546 --name geth-with-livepeer-protocol livepeer/geth-with-livepeer-protocol:confluence
```


## Step 2: Set up a broadcaster
### Step 2: Set up a broadcaster

`go run cmd/devtool/devtool.go setup broadcaster`

This command will submit the setup transactions for a broadcaster and generate the Bash script
`run_broadcaster_<ETH_ACCOUNT>.sh` which can be used to start a broadcaster node.

## Step 3: Set up a orchestrator/transcoder
### Step 3: Set up a orchestrator/transcoder

`go run cmd/devtool/devtool.go setup transcoder`

This command will submit the setup transactions for an orchestrator/transcoder and generate the Bash scripts:

* `run_orchestrator_with_transcoder_<ETH_ACCOUNT>.sh` which can be used to start an orchestrator node that contains a transcoder (combined OT)
* `run_orchestrator_standalone_<ETH_ACCOUNT>.sh` and `run_transcoder_<ETH_ACCOUNT>.sh` which can be used to start separate orchestrator and transcoder nodes (split O/T)
- `run_orchestrator_with_transcoder_<ETH_ACCOUNT>.sh` which can be used to start an orchestrator node that contains a transcoder (combined OT)
- `run_orchestrator_standalone_<ETH_ACCOUNT>.sh` and `run_transcoder_<ETH_ACCOUNT>.sh` which can be used to start separate orchestrator and transcoder nodes (split O/T)

## Extra Resources

### Scripts

Some helpful scripts are provided in the `scripts` directory.
Loading
Loading