Skip to content

docker: reserve core when building OpenCV with cuda 11.0 to avoid run… #23

docker: reserve core when building OpenCV with cuda 11.0 to avoid run…

docker: reserve core when building OpenCV with cuda 11.0 to avoid run… #23

Workflow file for this run

# This is the Github action to build and push the gocv/opencv Docker images.
#
name: Docker
on:
push:
branches: [ build-opencv-images ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
opencv:
name: opencv
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Check out the repo
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
gocv/opencv:4.8.1
ghcr.io/${{ github.repository_owner }}/opencv:4.8.1
tags: |
type=sha,format=long
type=raw,value=latest
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Log in to Github Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/[email protected]
with:
file: Dockerfile.opencv
platforms: linux/amd64,linux/arm64
context: .
push: true
tags: |
gocv/opencv:latest
gocv/opencv:4.8.1
ghcr.io/${{ github.repository_owner }}/opencv:latest
ghcr.io/${{ github.repository_owner }}/opencv:4.8.1
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
opencv-static:
name: opencv-static
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Check out the repo
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
gocv/opencv:4.8.1-static
ghcr.io/${{ github.repository_owner }}/opencv:4.8.1-static
tags: |
type=sha,format=long
type=raw,value=latest
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Log in to Github Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/[email protected]
with:
file: Dockerfile.opencv-static
platforms: linux/amd64,linux/arm64
context: .
push: true
tags: |
gocv/opencv:4.8.1-static
ghcr.io/${{ github.repository_owner }}/opencv:4.8.1-static
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
opencv-gpu-cuda-11:
name: opencv-gpu-cuda-11
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Check out the repo
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
gocv/opencv:4.8.1-gpu-cuda-11
ghcr.io/${{ github.repository_owner }}/opencv:4.8.1-gpu-cuda-11
tags: |
type=sha,format=long
type=raw,value=latest
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Log in to Github Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/[email protected]
with:
file: Dockerfile.opencv-gpu-cuda-11
platforms: linux/amd64
context: .
push: true
tags: |
gocv/opencv:4.8.1-gpu-cuda-11
ghcr.io/${{ github.repository_owner }}/opencv:4.8.1-gpu-cuda-11
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
opencv-gpu-cuda-11-2-2:
name: opencv-gpu-cuda-11-2-2
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Check out the repo
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
gocv/opencv:4.8.1-gpu-cuda-11.2.2
ghcr.io/${{ github.repository_owner }}/opencv:4.8.1-gpu-cuda-11.2.2
tags: |
type=sha,format=long
type=raw,value=latest
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Log in to Github Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/[email protected]
with:
file: Dockerfile.opencv-gpu-cuda-11.2.2
platforms: linux/amd64
context: .
push: true
tags: |
gocv/opencv:4.8.1-gpu-cuda-11.2.2
ghcr.io/${{ github.repository_owner }}/opencv:4.8.1-gpu-cuda-11.2.2
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
opencv-gpu-cuda-12:
name: opencv-gpu-cuda-12
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Check out the repo
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
gocv/opencv:4.8.1-gpu-cuda-12
ghcr.io/${{ github.repository_owner }}/opemcv:4.8.1-gpu-cuda-12
tags: |
type=sha,format=long
type=raw,value=latest
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Log in to Github Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/[email protected]
with:
file: Dockerfile.opencv-gpu-cuda-12
platforms: linux/amd64
context: .
push: true
tags: |
gocv/opencv:4.8.1-gpu-cuda-12
ghcr.io/${{ github.repository_owner }}/opencv:4.8.1-gpu-cuda-12
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
opencv-ubuntu-18-04:
name: opencv-ubuntu-18-04
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Check out the repo
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
gocv/opencv:4.8.1-ubuntu-18.04
ghcr.io/${{ github.repository_owner }}/opencv:4.8.1-ubuntu-18.04
tags: |
type=sha,format=long
type=raw,value=latest
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Log in to Github Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/[email protected]
with:
file: Dockerfile.opencv-ubuntu-18.04
platforms: linux/amd64
context: .
push: true
tags: |
gocv/opencv:4.8.1-ubuntu-18.04
ghcr.io/${{ github.repository_owner }}/opencv:4.8.1-ubuntu-18.04
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
opencv-ubuntu-20-04:
name: opencv-ubuntu-20-04
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Check out the repo
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
gocv/opencv:4.8.1-ubuntu-20.04
ghcr.io/${{ github.repository_owner }}/opencv:4.8.1-ubuntu-20.04
tags: |
type=sha,format=long
type=raw,value=latest
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Log in to Github Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/[email protected]
with:
file: Dockerfile.opencv-ubuntu-20.04
platforms: linux/amd64
context: .
push: true
tags: |
gocv/opencv:4.8.1-ubuntu-20.04
ghcr.io/${{ github.repository_owner }}/opencv:4.8.1-ubuntu-20.04
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
opencv-ubuntu-22-04:
name: opencv-ubuntu-22-04
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Check out the repo
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
gocv/opencv:4.8.1-ubuntu-22.04
ghcr.io/${{ github.repository_owner }}/opencv:4.8.1-ubuntu-22.04
tags: |
type=sha,format=long
type=raw,value=latest
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Log in to Github Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/[email protected]
with:
file: Dockerfile.opencv-ubuntu-22.04
platforms: linux/amd64
context: .
push: true
tags: |
gocv/opencv:4.8.1-ubuntu-22.04
ghcr.io/${{ github.repository_owner }}/opencv:4.8.1-ubuntu-22.04
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max