Skip to content

Commit

Permalink
Adding cuda versions and ffmpeg 6.1-dev (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
troykelly authored Jul 16, 2023
1 parent 739855c commit bd7df03
Show file tree
Hide file tree
Showing 5 changed files with 544 additions and 1,051 deletions.
71 changes: 71 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
{
"name": "Ubuntu",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/base:jammy",
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": true,
"configureZshAsDefaultShell": true,
"installOhMyZsh": true,
"upgradePackages": true,
"nonFreePackages": true,
"username": "vscode",
"userUid": "automatic",
"userGid": "automatic"
},
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
"moby": true,
"installDockerBuildx": true,
"version": "latest",
"dockerDashComposeVersion": "v2"
},
"ghcr.io/devcontainers/features/github-cli:1": {
"installDirectlyFromGitHubRelease": true,
"version": "latest"
},
"ghcr.io/devcontainers-contrib/features/actions-runner:1": {
"version": "latest",
"dotnetVersion": "latest"
},
"ghcr.io/devcontainers-contrib/features/gh-release:1": {
"repo": "digitalocean/doctl",
"binaryNames": "gh",
"version": "latest",
"binLocation": "/usr/local/bin",
"libLocation": "/usr/local/lib"
},
"ghcr.io/devcontainers-contrib/features/zsh-plugins:0": {
"plugins": "ssh-agent npm",
"omzPlugins": "https://github.com/zsh-users/zsh-autosuggestions",
"username": "vscode"
},
"ghcr.io/stuartleeks/dev-container-features/shell-history:0": {}
},
"customizations": {
"vscode": {
"extensions": [
"ms-azuretools.vscode-docker",
"GitHub.copilot",
"GitHub.vscode-pull-request-github",
"GitHub.github-vscode-theme"
]
}
}

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "uname -a",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
50 changes: 15 additions & 35 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ jobs:
build:
strategy:
matrix:
version: [12.0.1, 12.0.0, 11.8.0, 11.7.1, 11.7.0]
ffmpeg: [5.1.2, "6.0"]
version: [12.2.0, 12.0.1, 12.0.0, 11.8.0]
ffmpeg: [5.1.2, "6.0", "6.1-dev"]
os: [ubuntu22.04]
# yamllint disable rule:line-length
name: 👷 Build CUDA ${{ matrix.version }} on ${{ matrix.os }} with ffmpeg ${{ matrix.ffmpeg }}
Expand All @@ -69,14 +69,14 @@ jobs:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v3

- name: Install Latest Docker
# yamllint disable rule:line-length
run: |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce
# yamllint enable rule:line-length
# - name: Install Latest Docker
# # yamllint disable rule:line-length
# run: |
# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
# sudo apt-get update
# sudo apt-get install docker-ce
# # yamllint enable rule:line-length

- name: 📝 Docker meta
id: meta
Expand All @@ -97,21 +97,9 @@ jobs:
type=ref,event=branch
type=ref,event=pr
type=sha
type=edge,enable=${{ matrix.version == '12.0.1' && matrix.os == 'ubuntu22.04' && matrix.ffmpeg == '6.0' }},priority=700,prefix=,suffix=,branch=$repo.default_branch
type=edge,enable=${{ matrix.version == '12.2.0' && matrix.os == 'ubuntu22.04' && matrix.ffmpeg == '6.0' }},priority=700,prefix=,suffix=,branch=$repo.default_branch
# yamllint enable rule:line-length

- name: 🏗 Set up build cache
id: cache
uses: actions/cache@v3.2.6
with:
path: /tmp/.buildx-cache
# Key is named differently to avoid collision
# yamllint disable rule:line-length
key: ${{ runner.os }}-multi-buildx-${{ matrix.version }}-${{ matrix.os }}-${{ matrix.ffmpeg }}-${{ github.sha }}
# yamllint disable rule:line-length
restore-keys: |
${{ runner.os }}-multi-buildx-${{ matrix.version }}-${{ matrix.os }}-${{ matrix.ffmpeg }}
- name: 🏗 Set up QEMU
uses: docker/setup-qemu-action@v2

Expand All @@ -134,16 +122,16 @@ jobs:
password: ${{ secrets.CI_PAT }}

- name: 🚀 Build
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
push: true
builder: ${{ steps.buildx.outputs.name }}
context: ./
file: ./ffmpeg/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new
cache-from: type=gha
cache-to: type=gha,mode=max
# yamllint disable-line rule:line-length
# platforms: linux/amd64,linux/386,linux/arm/v6,linux/arm/v7,linux/arm64/v8
platforms: linux/amd64
Expand All @@ -156,12 +144,4 @@ jobs:
BUILD_VERSION=${{ needs.information.outputs.version }}
CUDA=${{ matrix.version }}
OS=${{ matrix.os }}
FFMPEG_VERSION=${{ matrix.ffmpeg }}
# This ugly bit is necessary, or our cache will grow forever...
# Well until we hit GitHub's limit of 5GB :)
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: 🚚 Swap build cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
FFMPEG_VERSION=${{ matrix.ffmpeg }}
56 changes: 18 additions & 38 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ jobs:
deploy:
strategy:
matrix:
version: [12.0.1, 12.0.0, 11.8.0, 11.7.1, 11.7.0]
ffmpeg: [5.1.2, "6.0"]
version: [12.2.0, 12.0.1, 12.0.0, 11.8.0]
ffmpeg: [5.1.2, "6.0", "6.1-dev"]
os: [ubuntu22.04]
# yamllint disable rule:line-length
name: 👷 Build & Deploy CUDA ${{ matrix.version }} on ${{ matrix.os }} with ffmpeg ${{ matrix.ffmpeg }}
Expand All @@ -71,14 +71,14 @@ jobs:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v3

- name: Install Latest Docker
# yamllint disable rule:line-length
run: |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce
# yamllint enable rule:line-length
# - name: Install Latest Docker
# # yamllint disable rule:line-length
# run: |
# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
# sudo apt-get update
# sudo apt-get install docker-ce
# # yamllint enable rule:line-length

- name: 📝 Docker meta
id: meta
Expand All @@ -101,29 +101,17 @@ jobs:
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=semver,pattern={{version}},enable=${{ startsWith(github.ref, 'refs/tags/v') && matrix.version == '12.0.1' && matrix.os == 'ubuntu22.04' && matrix.ffmpeg == '6.0' }},prefix=,suffix=
type=semver,pattern={{major}}.{{minor}},enable=${{ startsWith(github.ref, 'refs/tags/v') && matrix.version == '12.0.1' && matrix.os == 'ubuntu22.04' && matrix.ffmpeg == '6.0' }},prefix=,suffix=
type=semver,pattern={{major}},enable=${{ startsWith(github.ref, 'refs/tags/v') && matrix.version == '12.0.1' && matrix.os == 'ubuntu22.04' && matrix.ffmpeg == '6.0' }},prefix=,suffix=
type=semver,pattern={{version}},enable=${{ startsWith(github.ref, 'refs/tags/v') && matrix.version == '12.2.0' && matrix.os == 'ubuntu22.04' && matrix.ffmpeg == '6.0' }},prefix=,suffix=
type=semver,pattern={{major}}.{{minor}},enable=${{ startsWith(github.ref, 'refs/tags/v') && matrix.version == '12.2.0' && matrix.os == 'ubuntu22.04' && matrix.ffmpeg == '6.0' }},prefix=,suffix=
type=semver,pattern={{major}},enable=${{ startsWith(github.ref, 'refs/tags/v') && matrix.version == '12.2.0' && matrix.os == 'ubuntu22.04' && matrix.ffmpeg == '6.0' }},prefix=,suffix=
type=sha
type=edge,enable=${{ matrix.version == '12.0.1' && matrix.os == 'ubuntu22.04' && matrix.ffmpeg == '6.0' }},priority=700,prefix=,suffix=,branch=$repo.default_branch
type=edge,enable=${{ matrix.version == '12.2.0' && matrix.os == 'ubuntu22.04' && matrix.ffmpeg == '6.0' }},priority=700,prefix=,suffix=,branch=$repo.default_branch
type=raw,prefix=,suffix=,value=${{ matrix.version }}-latest,enable=${{ startsWith(github.ref, 'refs/tags/v') && matrix.os == 'ubuntu22.04' && matrix.ffmpeg == '6.0' }}
type=raw,prefix=,suffix=,value=${{ matrix.version }}-${{ matrix.os }}-latest,enable=${{ startsWith(github.ref, 'refs/tags/v') && matrix.ffmpeg == '6.0' }}
type=raw,prefix=,suffix=,value=${{ matrix.version }}-${{ matrix.ffmpeg }}-${{ matrix.os }}-latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }}
type=raw,prefix=,suffix=,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') && matrix.version == '12.0.1' && matrix.os == 'ubuntu22.04' && matrix.ffmpeg == '6.0' }},prefix=,suffix=
type=raw,prefix=,suffix=,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') && matrix.version == '12.2.0' && matrix.os == 'ubuntu22.04' && matrix.ffmpeg == '6.0' }},prefix=,suffix=
# yamllint enable rule:line-length

- name: 🏗 Set up build cache
id: cache
uses: actions/cache@v3.2.6
with:
path: /tmp/.buildx-cache
# Key is named differently to avoid collision
# yamllint disable rule:line-length
key: ${{ runner.os }}-multi-buildx-${{ matrix.version }}-${{ matrix.os }}-${{ matrix.ffmpeg }}-${{ github.sha }}
# yamllint disable rule:line-length
restore-keys: |
${{ runner.os }}-multi-buildx-${{ matrix.version }}-${{ matrix.os }}-${{ matrix.ffmpeg }}
- name: 🏗 Set up QEMU
uses: docker/setup-qemu-action@v2

Expand Down Expand Up @@ -154,8 +142,8 @@ jobs:
file: ./ffmpeg/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new
cache-from: type=gha
cache-to: type=gha,mode=max
# yamllint disable-line rule:line-length
# platforms: linux/amd64,linux/386,linux/arm/v6,linux/arm/v7,linux/arm64/v8
platforms: linux/amd64
Expand All @@ -168,12 +156,4 @@ jobs:
BUILD_VERSION=${{ needs.information.outputs.version }}
CUDA=${{ matrix.version }}
OS=${{ matrix.os }}
FFMPEG_VERSION=${{ matrix.ffmpeg }}
# This ugly bit is necessary, or our cache will grow forever...
# Well until we hit GitHub's limit of 5GB :)
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: 🚚 Swap build cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
FFMPEG_VERSION=${{ matrix.ffmpeg }}
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# General
build/**/*

# macOS General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon
Icon


# Thumbnails
._*
Expand Down
Loading

0 comments on commit bd7df03

Please sign in to comment.