Skip to content

Commit 6ded186

Browse files
committed
bump: update Ubuntu & drop python 2.x
1 parent f7f053a commit 6ded186

File tree

5 files changed

+21
-45
lines changed

5 files changed

+21
-45
lines changed

.github/workflows/docker-builds.yml

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -17,37 +17,20 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
ubuntu_version: ["20.04"]
21-
python_version: ["2.7", "3.6", "3.7", "3.8", "3.9"]
20+
ubuntu_version: ["22.04"]
21+
python_version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
2222
opencv_version: ["4.10.0"]
2323
device: ["cpu", "gpu"]
24-
cuda_version: ["11.8.0"]
24+
cuda_version: ["12.4.1"]
2525
include:
26-
- { ubuntu_version: "22.04", python_version: "3.10", opencv_version: "4.10.0", device: "cpu" }
27-
- { ubuntu_version: "22.04", python_version: "3.11", opencv_version: "4.10.0", device: "cpu" }
28-
# fixme: python 3.12 install fails due to wring public keys to deadsnakes
29-
# - { ubuntu_version: "22.04", python_version: "3.12", opencv_version: "4.10.0", device: "cpu" }
30-
- {
31-
ubuntu_version: "22.04",
32-
python_version: "3.10",
33-
opencv_version: "4.10.0",
34-
device: "gpu",
35-
cuda_version: "12.5.0",
36-
}
37-
- {
38-
ubuntu_version: "22.04",
39-
python_version: "3.11",
40-
opencv_version: "4.10.0",
41-
device: "gpu",
42-
cuda_version: "12.5.0",
43-
}
44-
- {
45-
ubuntu_version: "22.04",
46-
python_version: "3.12",
47-
opencv_version: "4.10.0",
48-
device: "gpu",
49-
cuda_version: "12.5.0",
50-
}
26+
- { ubuntu_version: "24.04", python_version: "3.10", opencv_version: "4.10.0", device: "cpu" }
27+
- { ubuntu_version: "24.04", python_version: "3.11", opencv_version: "4.10.0", device: "cpu" }
28+
- { ubuntu_version: "24.04", python_version: "3.12", opencv_version: "4.10.0", device: "cpu" }
29+
- { ubuntu_version: "24.04", python_version: "3.13", opencv_version: "4.10.0", device: "cpu" }
30+
- { ubuntu_version: "24.04", python_version: "3.10", opencv_version: "4.10.0", device: "gpu", cuda_version: "12.8.0" }
31+
- { ubuntu_version: "24.04", python_version: "3.11", opencv_version: "4.10.0", device: "gpu", cuda_version: "12.8.0" }
32+
- { ubuntu_version: "24.04", python_version: "3.12", opencv_version: "4.10.0", device: "gpu", cuda_version: "12.8.0" }
33+
- { ubuntu_version: "24.04", python_version: "3.13", opencv_version: "4.10.0", device: "gpu", cuda_version: "12.8.0" }
5134
steps:
5235
- name: Checkout
5336
uses: actions/checkout@v4

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ repos:
4141
- id: prettier
4242
files: \.(json|yml|yaml|toml)
4343
# https://prettier.io/docs/en/options.html#print-width
44-
args: ["--print-width=120"]
44+
args: ["--print-width=140"]

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Docker: Python-OpenCV-FFmpeg(-CUDA)
22

3-
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/) 22.04 LTS.
3+
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/) 24.04 LTS.
44

55
## Tags
66

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

1010
## Build
1111

cpu/Dockerfile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RUN \
2121
# add sources for older pythons
2222
apt-get update -q --fix-missing && \
2323
apt-get install -y --no-install-recommends software-properties-common && \
24-
if [[ "$PYTHON_VERSION" =~ ^(2.7|3.6|3.7|3.12)$ ]]; then \
24+
if [[ "$PYTHON_VERSION" =~ ^(3.7|3.12)$ ]]; then \
2525
add-apt-repository ppa:deadsnakes/ppa ; \
2626
fi && \
2727
apt-add-repository universe && \
@@ -41,12 +41,8 @@ RUN \
4141

4242
# install python dependencies
4343
# sysctl -w net.ipv4.ip_forward=1 ; \
44-
if [[ "$PYTHON_VERSION" == "2.7" || "$PYTHON_VERSION" == "3.6" || "$PYTHON_VERSION" == "3.7" ]]; then \
45-
PIP_URL="https://bootstrap.pypa.io/pip/$PYTHON_VERSION/get-pip.py" ; \
46-
else \
47-
apt-get -y install --no-install-recommends python${PYTHON_VERSION}-distutils ; \
48-
PIP_URL="https://bootstrap.pypa.io/get-pip.py" ; \
49-
fi && \
44+
apt-get -y install --no-install-recommends python${PYTHON_VERSION}-distutils && \
45+
PIP_URL="https://bootstrap.pypa.io/get-pip.py" && \
5046
curl $PIP_URL | python
5147

5248
ENV PYTHONPATH="/usr/lib/python${PYTHON_VERSION}/site-packages:/usr/local/lib/python${PYTHON_VERSION}/site-packages"

gpu/Dockerfile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ RUN \
2727
# add sources for older pythons
2828
apt-get update -qq --fix-missing && \
2929
apt-get install -y --no-install-recommends software-properties-common && \
30-
if [[ "$PYTHON_VERSION" =~ ^(2.7|3.6|3.7|3.12)$ ]]; then \
30+
if [[ "$PYTHON_VERSION" =~ ^(3.7|3.12)$ ]]; then \
3131
add-apt-repository ppa:deadsnakes/ppa ; \
3232
fi && \
3333
apt-add-repository universe && \
@@ -47,11 +47,8 @@ RUN \
4747

4848
# install python dependencies
4949
# sysctl -w net.ipv4.ip_forward=1 ; \
50-
if [[ "$PYTHON_VERSION" == "2.7" || "$PYTHON_VERSION" == "3.6" || "$PYTHON_VERSION" == "3.7" ]]; then \
51-
PIP_URL="https://bootstrap.pypa.io/pip/$PYTHON_VERSION/get-pip.py" ; \
52-
else \
53-
apt-get -y install --no-install-recommends python${PYTHON_VERSION}-distutils ; \
54-
PIP_URL="https://bootstrap.pypa.io/get-pip.py" ; \
50+
apt-get -y install --no-install-recommends python${PYTHON_VERSION}-distutils && \
51+
PIP_URL="https://bootstrap.pypa.io/get-pip.py" && \
5552
fi && \
5653
curl $PIP_URL | python
5754

0 commit comments

Comments
 (0)