Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
b0548db
lint dockerfile
Borda Dec 22, 2022
004776d
Bump actions/cache from 3.0.11 to 3.2.2 (#22)
dependabot[bot] Jan 1, 2023
d6ddf03
building openCV 4.7 (#23)
Borda Jan 3, 2023
570b573
Bump docker/build-push-action from 3 to 4 (#24)
dependabot[bot] Feb 1, 2023
e253bf4
Bump actions/cache from 3.2.2 to 3.2.4 (#25)
dependabot[bot] Feb 1, 2023
e80eb76
Bump actions/cache from 3.2.4 to 3.2.6 (#26)
dependabot[bot] Mar 1, 2023
cb26ae9
Bump actions/checkout from 2 to 3 (#27)
dependabot[bot] Mar 1, 2023
4223053
Bump actions/cache from 3.2.6 to 3.3.1 (#29)
dependabot[bot] Apr 1, 2023
47d2739
bump opencv to `4.8.0` (#30)
Borda Jul 19, 2023
8dfcafd
install pip with | (#31)
Borda Sep 2, 2023
b25f4ee
ci: add labeling merge conflicts
Borda Sep 2, 2023
aaef6e4
version bump OpenCV 4.8.1 (#33)
Borda Sep 28, 2023
834f02a
bump base OS to `ubuntu:22.04` (#21)
Borda Sep 28, 2023
cd60b85
precommit: enable codespell & prettier (#34)
Borda Sep 28, 2023
ce5ffe4
Bump actions/checkout from 3 to 4 (#35)
dependabot[bot] Sep 28, 2023
2f55153
Bump docker/setup-buildx-action from 2 to 3 (#36)
dependabot[bot] Sep 28, 2023
b64ba12
Bump docker/build-push-action from 4 to 5 (#39)
dependabot[bot] Sep 28, 2023
3727067
Bump docker/login-action from 2 to 3 (#37)
dependabot[bot] Sep 28, 2023
b0eb101
Bump actions/cache from 3.3.1 to v3 (#38)
dependabot[bot] Sep 28, 2023
dcc34f6
bump: OpenCV `4.9.0` (#41)
Borda Dec 31, 2023
a71c8b6
Bump actions/setup-python from 4 to 5 (#44)
dependabot[bot] Jan 1, 2024
00583c6
remove unneeded files, python3 only (#1)
bjubes Dec 14, 2022
75c9d95
change docker hub user
bjubes Dec 15, 2022
01530c8
remove old python pip deps
bjubes Dec 15, 2022
b2ebe8f
use dzynetech docker user
bjubes Dec 21, 2022
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
6 changes: 0 additions & 6 deletions .github/CODEOWNERS

This file was deleted.

29 changes: 0 additions & 29 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

23 changes: 0 additions & 23 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

18 changes: 0 additions & 18 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

19 changes: 0 additions & 19 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,6 @@
# Basic dependabot.yml file with minimum configuration for two package managers

version: 2
updates:
# Enable version updates for python
- package-ecosystem: "pip"
# Look for a `requirements` in the `root` directory
directory: "/"
# Check for updates once a week
schedule:
interval: "monthly"
# Labels on pull requests for version updates only
labels:
- "CI / tests"
pull-request-branch-name:
# Separate sections of the branch name with a hyphen for example, `dependabot-npm_and_yarn-next_js-acorn-6.4.1`
separator: "-"
# Allow up to 5 open pull requests for pip dependencies
open-pull-requests-limit: 5
reviewers:
- "borda"

# Enable version updates for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install pkg
run: pip install "check-jsonschema>=0.10"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/code-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ jobs:
pre-commit-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5

- name: set PY
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v3.0.11
- uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
Expand Down
29 changes: 19 additions & 10 deletions .github/workflows/docker-builds.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: Publish Docker Image
# https://www.docker.com/blog/first-docker-github-action-is-here
# https://github.com/docker/build-push-action
on: # Trigger the workflow on push or pull request, but only for the master branch
on: # Trigger the workflow on push or pull request, but only for the master branch
push:
branches: [ master ]
branches:
- master
pull_request:
branches: [ master ]
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
Expand All @@ -17,29 +19,36 @@ jobs:
strategy:
fail-fast: false
matrix:
python_version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
opencv_version: ["4.6.0"]
ubuntu_version: ["20.04"]
python_version: ["2.7", "3.6", "3.7", "3.8", "3.9"]
opencv_version: ["4.9.0"]
device: ["cpu", "gpu"]
include:
- { ubuntu_version: "22.04", python_version: "3.10", opencv_version: "4.9.0", device: "cpu" }
- { ubuntu_version: "22.04", python_version: "3.10", opencv_version: "4.9.0", device: "gpu" }
- { ubuntu_version: "22.04", python_version: "3.11", opencv_version: "4.9.0", device: "cpu" }
- { ubuntu_version: "22.04", python_version: "3.11", opencv_version: "4.9.0", device: "gpu" }
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
# https://github.com/docker/setup-buildx-action
# Set up Docker Buildx - to use cache-from and cache-to argument of buildx command
- uses: docker/setup-buildx-action@v2
- uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
if: github.ref == 'refs/heads/master'
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: docker/build-push-action@v3
- uses: docker/build-push-action@v5
# https://github.com/docker/build-push-action#cache-to-registry
with:
build-args: |
UBUNTU_VERSION=${{ matrix.ubuntu_version }}
PYTHON_VERSION=${{ matrix.python_version }}
OPENCV_VERSION=${{ matrix.opencv_version }}
file: ${{ matrix.device }}/Dockerfile
# publish master
push: ${{ github.ref == 'refs/heads/master' }}
tags: borda/docker_python-opencv-ffmpeg:${{ matrix.device }}-py${{ matrix.python_version }}-cv${{ matrix.opencv_version }}
tags: dzynetech/docker_python-opencv-ffmpeg:${{ matrix.device }}-py${{ matrix.python_version }}-cv${{ matrix.opencv_version }}
timeout-minutes: 240
22 changes: 22 additions & 0 deletions .github/workflows/label-conflicts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Label conflicts

on:
push:
branches: ["master"]
pull_request_target:
types: ["synchronize", "reopened", "opened"]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
triage-conflicts:
runs-on: ubuntu-latest
steps:
- uses: mschilde/auto-label-merge-conflicts@8c6faa8a252e35ba5e15703b3d747bf726cdb95c # Oct 25, 2021
with:
CONFLICT_LABEL_NAME: "has conflicts"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAX_RETRIES: 3
WAIT_MS: 5000
23 changes: 20 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
ci:
autofix_prs: true
autoupdate_commit_msg: '[pre-commit.ci] pre-commit suggestions'
autoupdate_commit_msg: "[pre-commit.ci] pre-commit suggestions"
autoupdate_schedule: quarterly
# submodules: true

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v4.4.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
Expand All @@ -17,10 +17,27 @@ repos:
- id: check-added-large-files
- id: detect-private-key

- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
hooks:
- id: codespell

- repo: https://github.com/executablebooks/mdformat
rev: 0.7.14
rev: 0.7.16
hooks:
- id: mdformat
additional_dependencies:
- mdformat-gfm
- mdformat_frontmatter

- repo: https://github.com/pryorda/dockerfilelint-precommit-hooks
rev: v0.1.0
hooks:
- id: dockerfilelint

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
hooks:
- id: prettier
# https://prettier.io/docs/en/options.html#print-width
args: ["--print-width=120"]
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ignore all MD files:
**/*.md
20 changes: 8 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
# Docker: Python-OpenCV-FFmpeg(-CUDA)

Repository for clean Dockerfile containing [FFmpeg](https://www.ffmpeg.org/), [OpenCV4](https://opencv.org/) and [Python2/3](https://www.python.org/), based on [Ubuntu](https://www.ubuntu.com/) 20.04 LTS.
Repository for clean Dockerfile containing [FFmpeg](https://www.ffmpeg.org/), [OpenCV4](https://opencv.org/) and [Python3](https://www.python.org/), based on [Ubuntu](https://www.ubuntu.com/) 20.04 LTS.

## Tags

- `:cpu-pyX.y-cvX.y.z` for Python 2.x/3.x, OpenCV 4.6.x, FFmpeg
- `:gpu-pyX.y-cvX.y.z` for Python 2.x/3.x, OpenCV 4.6.x, FFmpeg with CUDA 11.4 support
- `:cpu-pyX.y-cvX.y.z` for Python 3.x, OpenCV 4.9.x, FFmpeg
- `:gpu-pyX.y-cvX.y.z` for Python 3.x, OpenCV 4.9.x, FFmpeg with CUDA 11.4 support

## Build

[![Publish Docker Image](https://github.com/Borda/docker_python-opencv-ffmpeg/workflows/Publish%20Docker%20Image/badge.svg?branch=master&event=push)](https://github.com/Borda/docker_python-opencv-ffmpeg/actions?query=workflow%3A%22Publish+Docker+Image%22)
[![Docker Build Status](https://img.shields.io/docker/cloud/build/borda/docker_python-opencv-ffmpeg)](https://hub.docker.com/r/borda/docker_python-opencv-ffmpeg)
[![DockerHub Pulls](https://img.shields.io/docker/pulls/borda/docker_python-opencv-ffmpeg.svg)](https://hub.docker.com/r/borda/docker_python-opencv-ffmpeg)
[![Docker](https://img.shields.io/docker/automated/borda/docker_python-opencv-ffmpeg)](https://hub.docker.com/r/borda/docker_python-opencv-ffmpeg)

<!--
[![Build Status](https://travis-ci.org/Borda/docker_python-opencv-ffmpeg.svg?branch=master)](https://travis-ci.org/Borda/docker_python-opencv-ffmpeg)
-->
[![Publish Docker Image](https://github.com/dzynetech/docker_python-opencv-ffmpeg/workflows/Publish%20Docker%20Image/badge.svg?branch=master&event=push)](https://github.com/dzynetech/docker_python-opencv-ffmpeg/actions?query=workflow%3A%22Publish+Docker+Image%22)
[![Docker Build Status](https://img.shields.io/docker/cloud/build/bjubes/docker_python-opencv-ffmpeg)](https://hub.docker.com/r/bjubes/docker_python-opencv-ffmpeg)
[![DockerHub Pulls](https://img.shields.io/docker/pulls/bjubes/docker_python-opencv-ffmpeg.svg)](https://hub.docker.com/r/bjubes/docker_python-opencv-ffmpeg)
[![Docker](https://img.shields.io/docker/automated/bjubes/docker_python-opencv-ffmpeg)](https://hub.docker.com/r/bjubes/docker_python-opencv-ffmpeg)

First you need to install docker on your local computer, see following [tutorial](https://docs.docker.com/install/linux/docker-ce/ubuntu/#set-up-the-repository). Note, for running the docker properly you have be logged as superuser otherwise you will face many partial issues which sometimes does not make much sense.

Expand All @@ -25,7 +21,7 @@ You can build it on your own, note it takes lots of time, be prepared.
```bash
git clone <git-repository>
cd docker_python-opencv-ffmpeg
docker image build -t python-opencv-ffmpeg:py3.8 -f gpu/Dockerfile --build-arg PYTHON_VERSION=3.8 .
docker image build -t python-opencv-ffmpeg:py3.9 -f cpu/Dockerfile --build-arg PYTHON_VERSION=3.9 .
```

To build other versions, select different Dockerfile.
Expand Down
1 change: 0 additions & 1 deletion _config.yml

This file was deleted.

Loading