Skip to content

Commit 0d52d77

Browse files
committed
[dist] Allow tagging docker images as latest on dispatch
1 parent 1875898 commit 0d52d77

4 files changed

Lines changed: 30 additions & 2 deletions

File tree

.github/workflows/docker-publish.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ name: Publish Docker Image
33

44
on:
55
workflow_dispatch:
6+
inputs:
7+
tag_latest:
8+
description: 'Also tag this build as `latest`'
9+
type: boolean
10+
default: false
611
push:
712
branches: [ "main" ]
813
release:
@@ -47,6 +52,7 @@ jobs:
4752
type=semver,pattern={{major}}.{{minor}}
4853
type=semver,pattern={{major}}
4954
type=sha
55+
type=raw,value=latest,enable=${{ github.event_name == 'workflow_dispatch' && inputs.tag_latest }}
5056
5157
- name: Build and push Docker image
5258
id: push

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
pip install scenedetect --upgrade
3131

32-
Requires ffmpeg/mkvmerge for video splitting support. Windows builds (MSI installer/portable ZIP) can be found on [the download page](https://scenedetect.com/download/).
32+
Requires ffmpeg/mkvmerge for video splitting support. Windows builds (MSI installer/portable ZIP) can be found on [the download page](https://scenedetect.com/download/). A Docker image with all dependencies included is available as [`ghcr.io/breakthrough/pyscenedetect`](https://github.com/Breakthrough/PySceneDetect/pkgs/container/pyscenedetect).
3333

3434
----------------------------------------------------------
3535

website/pages/changelog.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,11 @@ Development
768768

769769
- [feature] Add `scenedetect-core`, a new library-only package with minimal dependencies (`numpy` only): it does not depend on any specific OpenCV variant, allowing downstream projects to choose their own (e.g. `opencv-contrib-python`), and does not include the CLI dependencies or the `scenedetect` command [#558](https://github.com/Breakthrough/PySceneDetect/issues/558). Convenience extras `scenedetect-core[opencv]` and `scenedetect-core[opencv-headless]` are provided
770770
- [general] `scenedetect` and `scenedetect-headless` are unchanged: they continue to ship the full program (library + CLI) with `opencv-python` / `opencv-python-headless` respectively. All three packages provide the same `scenedetect` module (install or depend only one)
771-
- [feature] Official Docker images are now published to the GitHub Container Registry: `docker run --rm ghcr.io/breakthrough/pyscenedetect` runs the full CLI with all backends and external tools (ffmpeg, mkvmerge) included, thanks [@FNGarvin](https://github.com/FNGarvin) [#537](https://github.com/Breakthrough/PySceneDetect/pull/537)
771+
- [feature] Official Docker images are now published to the GitHub Container Registry with the full CLI, all backends, and external tools (ffmpeg, mkvmerge) included, thanks [@FNGarvin](https://github.com/FNGarvin) [#537](https://github.com/Breakthrough/PySceneDetect/pull/537)
772+
- Example usage (process a video in the current directory):
773+
```bash
774+
docker run --rm -v "$(pwd):/files" ghcr.io/breakthrough/pyscenedetect -i /files/video.mp4 detect-adaptive split-video -o /files
775+
```
772776

773777
#### General
774778

website/pages/download.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,24 @@ All three provide the same `scenedetect` Python module -- install only one of th
3333
<a href="../cli/" class="btn btn-success" style="margin-bottom:8px;" role="button"><span class="fa fa-book"></span>&nbsp; <b>Getting Started</b></a>
3434
</div>
3535

36+
## Docker Image &nbsp; <span class="wy-text-neutral"><span class="fa fa-ship"></span></span>
37+
38+
Official container images are published at [ghcr.io/breakthrough/pyscenedetect](https://github.com/breakthrough/PySceneDetect/pkgs/container/pyscenedetect). The image includes the full CLI, all optional backends (PyAV, MoviePy), and the external tools used for video splitting (`ffmpeg`, `mkvmerge`) -- no other setup is required:
39+
40+
```bash
41+
docker pull ghcr.io/breakthrough/pyscenedetect
42+
docker run --rm ghcr.io/breakthrough/pyscenedetect version
43+
```
44+
45+
To process videos, mount the folder containing them into the container (the image runs as a non-root user, so output files are written with regular permissions):
46+
47+
```bash
48+
docker run --rm -v "$(pwd):/files" ghcr.io/breakthrough/pyscenedetect \
49+
-i /files/video.mp4 detect-adaptive split-video -o /files
50+
```
51+
52+
The `latest` tag (the default when no tag is given) points to the most recent recommended build, and the `main` tag tracks the development branch. Starting with the next release, version tags (e.g. `0.7.1`) will also be published. `podman` can be used in place of `docker` in the commands above.
53+
3654
## Post Installation
3755

3856
After installation, you can call PySceneDetect from any terminal/command prompt by typing `scenedetect` (try running `scenedetect --help`, or `scenedetect version`). If you encounter any runtime errors while running PySceneDetect, ensure that you have all the required dependencies listed in the System Requirements section above (you should be able to `import numpy` and `import cv2`). If you encounter any issues or want to make a feature request, feel free to [report any bugs or share some feature requests/ideas](contributing.md) on the [issue tracker](https://github.com/Breakthrough/PySceneDetect/issues) and help make PySceneDetect even better.

0 commit comments

Comments
 (0)