Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
26 changes: 21 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
FROM ubuntu:latest
FROM ghcr.io/astral-sh/uv:python3.13-bookworm-slim AS builder

# Without this, some deps try to reconfigure tzdata (default is UTC)
ENV DEBIAN_FRONTEND=noninteractive
ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy
ENV UV_PYTHON_DOWNLOADS=0

RUN apt-get update && apt-get install -y python3 python3-pip libgl1-mesa-glx libglib2.0-0
WORKDIR /app
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=uv.lock,target=uv.lock \
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
uv sync --frozen --no-install-project --no-dev
ADD . /app
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --frozen --no-dev && \
uv pip install .

RUN pip3 install dvr-scan[opencv]
FROM python:3.13-slim-bookworm

RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=locked \
--mount=target=/var/cache/apt,type=cache,sharing=locked \
rm -f /etc/apt/apt.conf.d/docker-clean && \
apt-get update && apt-get install --no-install-recommends -yq libgl1-mesa-glx libglib2.0-0

COPY --from=builder --chown=app:app /app /app
ENV PATH="/app/.venv/bin:$PATH"

WORKDIR /video/

Expand Down
60 changes: 57 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,63 @@
# DVR-Scan is licensed under the BSD 2-Clause License; see the included
# LICENSE file, or visit one of the above pages for details.
#
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "dvr-scan"
dynamic = ["version"]
description = "Tool for finding and extracting motion events in video files (e.g. security camera footage)."
readme = "README.md"
license = { text = "BSD-2-Clause" }
requires-python = ">=3.8"
authors = [
{ name = "Brandon Castellano", email = "brandon248@gmail.com" },
]
keywords = [
"analysis",
"computer-vision",
"video",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Environment :: Console :: Curses",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Multimedia :: Video",
"Topic :: Multimedia :: Video :: Conversion",
"Topic :: Multimedia :: Video :: Non-Linear Editor",
"Topic :: Utilities",
]
dependencies = [
"numpy",
"platformdirs",
"scenedetect",
"screeninfo",
"tqdm",
"opencv-python",
"pillow",
]

[project.scripts]
dvr-scan = "dvr_scan.__main__:main"

[project.urls]
"Bug Tracker" = "https://github.com/Breakthrough/DVR-Scan/issues"
Documentation = "https://www.dvr-scan.com/docs"
Homepage = "https://www.dvr-scan.com/"
Repository = "https://github.com/Breakthrough/DVR-Scan"

[tool.setuptools]
packages = ["dvr_scan"]

[tool.ruff]
exclude = [
Expand Down
12 changes: 0 additions & 12 deletions requirements.txt

This file was deleted.

11 changes: 0 additions & 11 deletions requirements_headless.txt

This file was deleted.

74 changes: 0 additions & 74 deletions setup.cfg

This file was deleted.

17 changes: 0 additions & 17 deletions setup.py

This file was deleted.

Loading