Skip to content

Commit

Permalink
ci: use pre-built vs-ffmpeg-docker (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tohrusky authored Jan 23, 2025
1 parent 943e41b commit b335f1f
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 654 deletions.
60 changes: 2 additions & 58 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,6 @@
version: 2.1

jobs:
pre-build-ff-cuda:
docker:
- image: cimg/go:1.17
resource_class: small
steps:
- checkout
- setup_remote_docker:
docker_layer_caching: true
- run: |
make ff
mkdir -p images/cuda
docker image save -o "images/cuda/vs-ffmpeg_cuda.tar" vs-ffmpeg:cuda
- persist_to_workspace:
root: .
paths:
- images/cuda

pre-build-ff-rocm:
docker:
- image: cimg/go:1.17
resource_class: small
steps:
- checkout
- setup_remote_docker:
docker_layer_caching: true
- run: |
make ff-rocm
mkdir -p images/rocm
docker image save -o "images/rocm/vs-ffmpeg_rocm.tar" vs-ffmpeg:rocm
- persist_to_workspace:
root: .
paths:
- images/rocm

build-cuda:
docker:
- image: cimg/go:1.17
Expand All @@ -43,10 +9,7 @@ jobs:
- checkout
- setup_remote_docker:
docker_layer_caching: true
- attach_workspace:
at: .
- run: |
docker image load -i "images/cuda/vs-ffmpeg_cuda.tar"
echo $DOCKERHUB_PASSWORD | docker login -u lychee0 --password-stdin
make release
Expand All @@ -58,10 +21,7 @@ jobs:
- checkout
- setup_remote_docker:
docker_layer_caching: true
- attach_workspace:
at: .
- run: |
docker image load -i "images/rocm/vs-ffmpeg_rocm.tar"
echo $DOCKERHUB_PASSWORD | docker login -u lychee0 --password-stdin
make release-rocm
Expand All @@ -73,10 +33,7 @@ jobs:
- checkout
- setup_remote_docker:
docker_layer_caching: true
- attach_workspace:
at: .
- run: |
docker image load -i "images/cuda/vs-ffmpeg_cuda.tar"
echo $DOCKERHUB_PASSWORD | docker login -u lychee0 --password-stdin
make release-dev
Expand All @@ -88,38 +45,25 @@ jobs:
- checkout
- setup_remote_docker:
docker_layer_caching: true
- attach_workspace:
at: .
- run: |
docker image load -i "images/rocm/vs-ffmpeg_rocm.tar"
echo $DOCKERHUB_PASSWORD | docker login -u lychee0 --password-stdin
make release-rocm-dev
workflows:
version: 2
build_all:
jobs:
- pre-build-ff-cuda
- pre-build-ff-rocm
- build-cuda:
requires:
- pre-build-ff-cuda
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
- build-rocm:
requires:
- pre-build-ff-rocm
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
- build-cuda-dev:
requires:
- pre-build-ff-cuda
- build-rocm-dev:
requires:
- pre-build-ff-rocm
- build-cuda-dev
- build-rocm-dev
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml → .github/workflows/CI-test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: CI-test

on:
push:
Expand All @@ -17,7 +17,7 @@ jobs:
lint:
strategy:
matrix:
os-version: ["ubuntu-20.04"]
os-version: ["ubuntu-22.04"]
python-version: ["3.10"]

runs-on: ${{ matrix.os-version }}
Expand Down
16 changes: 3 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,26 +1,16 @@
.DEFAULT_GOAL := default

version := v0.2.0
VS_FFMPEG_DOCKER_VERSION := v0.0.1

.PHONY: lint ## pip install pre-commit
lint:
pre-commit install
pre-commit run --all-files

.PHONY: ff
ff:
docker buildx build -f vs-ffmpeg.dockerfile -t vs-ffmpeg .
docker tag vs-ffmpeg vs-ffmpeg:latest
docker tag vs-ffmpeg vs-ffmpeg:cuda

.PHONY: ff-rocm
ff-rocm:
docker buildx build -f vs-ffmpeg-rocm.dockerfile -t vs-ffmpeg .
docker tag vs-ffmpeg vs-ffmpeg:rocm

.PHONY: pt
pt:
docker buildx build -f vs-pytorch.dockerfile -t lychee0/vs-pytorch .
docker buildx build -f vs-pytorch.dockerfile -t lychee0/vs-pytorch --build-arg BASE_CONTAINER_TAG=${VS_FFMPEG_DOCKER_VERSION} .
docker tag lychee0/vs-pytorch lychee0/vs-pytorch:latest
docker tag lychee0/vs-pytorch lychee0/vs-pytorch:dev
docker tag lychee0/vs-pytorch lychee0/vs-pytorch:cuda-dev
Expand All @@ -42,7 +32,7 @@ pt-release:

.PHONY: pt-rocm
pt-rocm:
docker buildx build -f vs-pytorch-rocm.dockerfile -t lychee0/vs-pytorch .
docker buildx build -f vs-pytorch-rocm.dockerfile -t lychee0/vs-pytorch --build-arg BASE_CONTAINER_TAG=${VS_FFMPEG_DOCKER_VERSION} .
docker tag lychee0/vs-pytorch lychee0/vs-pytorch:rocm-dev
docker tag lychee0/vs-pytorch lychee0/vs-pytorch:rocm-${version}
docker tag lychee0/vs-pytorch lychee0/vs-pytorch:rocm
Expand Down
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# vs-playground

[![CI-test](https://github.com/TensoRaws/vs-playground/actions/workflows/CI-test.yml/badge.svg)](https://github.com/TensoRaws/vs-playground/actions/workflows/CI-test.yml)
[![Release](https://github.com/TensoRaws/vs-playground/actions/workflows/Release.yml/badge.svg)](https://github.com/TensoRaws/vs-playground/actions/workflows/Release.yml)
[![CircleCI](https://dl.circleci.com/status-badge/img/circleci/RJWBNXdmdaDACvcacXFQ3e/Ft9gQaqD6LLAwZL3wjB4WL/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/circleci/RJWBNXdmdaDACvcacXFQ3e/Ft9gQaqD6LLAwZL3wjB4WL/tree/main)

dev with docker and jupyter notebook!

### [Base Image](https://github.com/TensoRaws/vs-ffmpeg-docker)

### Preparations

- docker and docker-compose
Expand Down Expand Up @@ -41,16 +45,17 @@ the playground image has sshd installed, you can ssh into the container to dev

### Build

build [base image](./vs-pytorch.dockerfile) (default for FinalRip) and [playground image](./vs-playground.dockerfile)
build [image](./vs-pytorch.dockerfile) (default for FinalRip) and [playground image](./vs-playground.dockerfile)

```bash
make ff && make pt && make pg
make pt && make pg
```

`make ff-rocm && make pt-rocm && make pg-rocm` for AMD GPU
`make pt-rocm && make pg-rocm` for AMD GPU

### Reference

- [vs-ffmpeg-docker](https://github.com/TensoRaws/vs-ffmpeg-docker)
- [VapourSynth](https://www.vapoursynth.com/)
- [yuuno](https://github.com/Irrational-Encoding-Wizardry/yuuno)

Expand Down
Loading

0 comments on commit b335f1f

Please sign in to comment.