Skip to content

Commit

Permalink
Merge branch 'master' into bump/py-3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Jul 8, 2024
2 parents 5d53214 + 18c3ea9 commit 06b3666
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 25 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/code-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:

- name: set PY
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}

- uses: pre-commit/action@v3.0.0
- uses: pre-commit/action@v3.0.1
# this action also provides an additional behaviour when used in private repositories
# when configured with a github token, the action will push back fixes to the pull request branch
#with:
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/docker-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ jobs:
matrix:
ubuntu_version: ["20.04"]
python_version: ["2.7", "3.6", "3.7", "3.8", "3.9"]
opencv_version: ["4.9.0"]
opencv_version: ["4.10.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" }
- { ubuntu_version: "22.04", python_version: "3.12", opencv_version: "4.9.0", device: "cpu" }
- { ubuntu_version: "22.04", python_version: "3.12", opencv_version: "4.9.0", device: "gpu" }
- { ubuntu_version: "22.04", python_version: "3.10", opencv_version: "4.10.0", device: "cpu" }
- { ubuntu_version: "22.04", python_version: "3.10", opencv_version: "4.10.0", device: "gpu" }
- { ubuntu_version: "22.04", python_version: "3.11", opencv_version: "4.10.0", device: "cpu" }
- { ubuntu_version: "22.04", python_version: "3.11", opencv_version: "4.10.0", device: "gpu" }
- { ubuntu_version: "22.04", python_version: "3.12", opencv_version: "4.10.0", device: "cpu" }
- { ubuntu_version: "22.04", python_version: "3.12", opencv_version: "4.10.0", device: "gpu" }
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -40,7 +40,7 @@ jobs:
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: docker/build-push-action@v5
- uses: docker/build-push-action@v6
# https://github.com/docker/build-push-action#cache-to-registry
with:
build-args: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/label-conflicts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
triage-conflicts:
runs-on: ubuntu-latest
steps:
- uses: mschilde/auto-label-merge-conflicts@8c6faa8a252e35ba5e15703b3d747bf726cdb95c # Oct 25, 2021
- uses: mschilde/auto-label-merge-conflicts@591722e97f3c4142df3eca156ed0dcf2bcd362bd # Jul 20, 2023
with:
CONFLICT_LABEL_NAME: "has conflicts"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ repos:
- id: dockerfilelint

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
rev: v3.1.0
hooks:
- id: prettier
files: \.(json|yml|yaml|toml)
# https://prettier.io/docs/en/options.html#print-width
args: ["--print-width=120"]
2 changes: 0 additions & 2 deletions .prettierignore

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Repository for clean Dockerfile containing [FFmpeg](https://www.ffmpeg.org/), [O

## Tags

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

## Build

Expand Down
8 changes: 4 additions & 4 deletions cpu/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# https://www.learnopencv.com/install-opencv3-on-ubuntu/
# https://www.osradar.com/how-to-install-opencv-on-ubuntu-20-04/

ARG UBUNTU_VERSION=22.04
ARG UBUNTU_VERSION="22.04"

FROM ubuntu:${UBUNTU_VERSION}

LABEL maintainer="https://github.com/Borda"

ARG PYTHON_VERSION=3.9
ARG OPENCV_VERSION=4.9.0
ARG PYTHON_VERSION="3.9"
ARG OPENCV_VERSION="4.10.0"

# Needed for string substitution
SHELL ["/bin/bash", "-c"]
Expand Down Expand Up @@ -41,7 +41,7 @@ RUN \

# install python dependencies
# sysctl -w net.ipv4.ip_forward=1 ; \
if [[ "$PYTHON_VERSION" == "2.7" || "$PYTHON_VERSION" == "3.6" ]]; then \
if [[ "$PYTHON_VERSION" == "2.7" || "$PYTHON_VERSION" == "3.6" || "$PYTHON_VERSION" == "3.7" ]]; then \
PIP_URL="https://bootstrap.pypa.io/pip/$PYTHON_VERSION/get-pip.py" ; \
else \
apt-get -y install --no-install-recommends python${PYTHON_VERSION}-distutils ; \
Expand Down
10 changes: 5 additions & 5 deletions gpu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

# CALL: docker image build -t python-opencv-ffmpeg:py36 -f cpu/Dockerfile --build-arg PYTHON_VERSION=3.6 .

ARG CUDA_VERSION=11.8.0
ARG UBUNTU_VERSION=22.04
ARG CUDA_VERSION="11.8.0"
ARG UBUNTU_VERSION="22.04"

FROM nvidia/cuda:${CUDA_VERSION}-devel-ubuntu${UBUNTU_VERSION}

LABEL maintainer="https://github.com/Borda"

ARG PYTHON_VERSION=3.9
ARG OPENCV_VERSION=4.9.0
ARG PYTHON_VERSION="3.9"
ARG OPENCV_VERSION="4.10.0"

# Needed for string substitution
SHELL ["/bin/bash", "-c"]
Expand Down Expand Up @@ -47,7 +47,7 @@ RUN \

# install python dependencies
# sysctl -w net.ipv4.ip_forward=1 ; \
if [[ "$PYTHON_VERSION" == "2.7" || "$PYTHON_VERSION" == "3.6" ]]; then \
if [[ "$PYTHON_VERSION" == "2.7" || "$PYTHON_VERSION" == "3.6" || "$PYTHON_VERSION" == "3.7" ]]; then \
PIP_URL="https://bootstrap.pypa.io/pip/$PYTHON_VERSION/get-pip.py" ; \
else \
apt-get -y install --no-install-recommends python${PYTHON_VERSION}-distutils ; \
Expand Down

0 comments on commit 06b3666

Please sign in to comment.