mirror of
https://github.com/photoprism/photoprism.git
synced 2026-07-17 16:49:04 +00:00
Build: Backport libvips in Jammy images and document 8.14+
- add scripts/dist/install-libvips.sh for Jammy backport installs - switch jammy and jammy-slim Dockerfiles to use the new installer - document libvips 8.14+ requirement in setup/pkg/linux docs - update thumb/README.md and regenerate setup/pkg/linux/README.html Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
parent
f0b7c6c863
commit
f58335cb4b
6 changed files with 111 additions and 10 deletions
|
|
@ -51,7 +51,7 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
|
|||
apt-get -qq install \
|
||||
libc6 ca-certificates bash sudo nano avahi-utils jq lsof lshw \
|
||||
xz-utils exiftool sqlite3 postgresql-client tzdata gpg make zip unzip wget curl rsync \
|
||||
imagemagick libvips-dev rawtherapee ffmpeg libavcodec-extra x264 x265 libde265-dev \
|
||||
imagemagick rawtherapee ffmpeg libavcodec-extra x264 x265 libde265-dev \
|
||||
libaom-dev libvpx-dev libwebm-dev libjpeg-dev libmatroska-dev libdvdread-dev libebml5 libgav1-bin libatomic1 \
|
||||
va-driver-all libva2 iputils-ping dnsutils libmagic-mgc binutils binutils-gold \
|
||||
&& \
|
||||
|
|
@ -59,6 +59,7 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
|
|||
/scripts/install-darktable.sh && \
|
||||
/scripts/install-yt-dlp.sh && \
|
||||
/scripts/install-libheif.sh && \
|
||||
/scripts/install-libvips.sh && \
|
||||
echo 'alias ll="ls -alh"' >> /etc/skel/.bashrc && \
|
||||
echo 'export PS1="\u@$DOCKER_TAG:\w\$ "' >> /etc/skel/.bashrc && \
|
||||
echo "ALL ALL=(ALL) NOPASSWD:SETENV: /scripts/entrypoint-init.sh" >> /etc/sudoers.d/init && \
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
|
|||
apt-get -qq install \
|
||||
libc6 ca-certificates bash sudo nano avahi-utils jq lsof lshw \
|
||||
xz-utils exiftool sqlite3 postgresql-client tzdata gpg make zip unzip wget curl rsync \
|
||||
imagemagick libvips-dev rawtherapee ffmpeg libavcodec-extra x264 x265 libde265-dev \
|
||||
imagemagick rawtherapee ffmpeg libavcodec-extra x264 x265 libde265-dev \
|
||||
libaom-dev libvpx-dev libwebm-dev libjpeg-dev libmatroska-dev libdvdread-dev libebml5 libgav1-bin libatomic1 \
|
||||
va-driver-all libva2 iputils-ping dnsutils libmagic-mgc binutils binutils-gold \
|
||||
&& \
|
||||
|
|
@ -85,6 +85,7 @@ RUN echo 'APT::Acquire::Retries "3";' > /etc/apt/apt.conf.d/80retries && \
|
|||
/scripts/install-darktable.sh && \
|
||||
/scripts/install-yt-dlp.sh && \
|
||||
/scripts/install-libheif.sh && \
|
||||
/scripts/install-libvips.sh && \
|
||||
/scripts/install-chrome.sh && \
|
||||
echo "ALL ALL=(ALL) NOPASSWD:SETENV: ALL" >> /etc/sudoers.d/all && \
|
||||
mkdir -p /etc/skel/.config/go/telemetry && \
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
## PhotoPrism — Thumbnails Package
|
||||
|
||||
**Last Updated:** February 20, 2026
|
||||
**Last Updated:** March 3, 2026
|
||||
|
||||
### Overview
|
||||
|
||||
|
|
@ -9,6 +9,7 @@
|
|||
### Constraints
|
||||
|
||||
- Uses libvips via govips; initialization is centralized in `VipsInit`.
|
||||
- Requires libvips 8.14+ with the current govips bindings (`github.com/davidbyttow/govips/v2`).
|
||||
- Works on files or in-memory buffers; writes outputs with `fs.ModeFile`.
|
||||
- ICC handling: if a JPEG lacks an embedded profile but sets EXIF `InteroperabilityIndex` (`R03`/Adobe RGB, `R98`/sRGB, `THM`/thumbnail), we embed an Adobe-compatible profile; otherwise we leave color untouched.
|
||||
- Metadata is removed from outputs to keep thumbs small.
|
||||
|
|
|
|||
81
scripts/dist/install-libvips.sh
vendored
Executable file
81
scripts/dist/install-libvips.sh
vendored
Executable file
|
|
@ -0,0 +1,81 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Installs libvips from a Jammy backport PPA.
|
||||
# bash <(curl -s https://raw.githubusercontent.com/photoprism/photoprism/develop/scripts/dist/install-libvips.sh)
|
||||
|
||||
set -Eeuo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH"
|
||||
|
||||
if [[ ! -r /etc/os-release ]]; then
|
||||
echo "ERROR: /etc/os-release not found." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# shellcheck source=/dev/null
|
||||
. /etc/os-release
|
||||
|
||||
if [[ "${ID:-}" != "ubuntu" ]]; then
|
||||
echo "ERROR: This installer currently supports Ubuntu only." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! command -v apt-get >/dev/null 2>&1; then
|
||||
echo "ERROR: apt-get not found." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SUDO=""
|
||||
if [[ "$(id -u)" -ne 0 ]]; then
|
||||
if command -v sudo >/dev/null 2>&1; then
|
||||
SUDO="sudo"
|
||||
else
|
||||
echo "ERROR: root or sudo access is required." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
PPA_USER="${LIBVIPS_PPA_USER:-0k53d-karl-f830m}"
|
||||
PPA_NAME="${LIBVIPS_PPA_NAME:-vips}"
|
||||
PPA_FINGERPRINT="${LIBVIPS_PPA_FINGERPRINT:-573634A0CBF3F3DCECCF1EB7212ED20BE4FE4BA6}"
|
||||
PPA_BASE_URL="https://ppa.launchpadcontent.net/${PPA_USER}/${PPA_NAME}/ubuntu"
|
||||
PPA_CODENAME="${VERSION_CODENAME:-jammy}"
|
||||
KEYRING_PATH="/etc/apt/keyrings/libvips-archive-keyring.gpg"
|
||||
SOURCES_PATH="/etc/apt/sources.list.d/libvips-ppa.list"
|
||||
|
||||
export DEBIAN_FRONTEND="noninteractive"
|
||||
|
||||
if ! command -v curl >/dev/null 2>&1 || ! command -v gpg >/dev/null 2>&1; then
|
||||
${SUDO} apt-get update
|
||||
${SUDO} apt-get install -y curl gnupg ca-certificates
|
||||
fi
|
||||
|
||||
${SUDO} mkdir -p -m 755 /etc/apt/keyrings
|
||||
|
||||
key_tmp="$(mktemp)"
|
||||
keyring_tmp="$(mktemp)"
|
||||
trap 'rm -f "${key_tmp}" "${keyring_tmp}"' EXIT
|
||||
|
||||
curl -fsSL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x${PPA_FINGERPRINT}" -o "${key_tmp}"
|
||||
|
||||
found_fingerprint="$(gpg --show-keys --with-colons "${key_tmp}" | awk -F: '/^fpr:/ { print $10; exit }')"
|
||||
if [[ "${found_fingerprint}" != "${PPA_FINGERPRINT}" ]]; then
|
||||
echo "ERROR: Unexpected signing key fingerprint '${found_fingerprint}'." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
gpg --dearmor < "${key_tmp}" > "${keyring_tmp}"
|
||||
${SUDO} install -m 644 -o root -g root "${keyring_tmp}" "${KEYRING_PATH}"
|
||||
|
||||
${SUDO} mkdir -p -m 755 /etc/apt/sources.list.d
|
||||
printf 'deb [arch=%s signed-by=%s] %s %s main\n' \
|
||||
"$(dpkg --print-architecture)" "${KEYRING_PATH}" "${PPA_BASE_URL}" "${PPA_CODENAME}" \
|
||||
| ${SUDO} tee "${SOURCES_PATH}" >/dev/null
|
||||
|
||||
${SUDO} apt-get update
|
||||
${SUDO} apt-get install -y libvips-dev
|
||||
|
||||
if command -v vips >/dev/null 2>&1; then
|
||||
vips --version
|
||||
fi
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -4,7 +4,7 @@ As an alternative to our [Docker images](https://docs.photoprism.app/getting-sta
|
|||
|
||||
These [binary installation packages](https://dl.photoprism.app/pkg/linux/) are intended for **experienced users** and **maintainers of third-party integrations** only, as they [require manual configuration](#configuration) and [do not include tested system dependencies](#dependencies). Since we are unable to [provide support](https://www.photoprism.app/kb/getting-support) for custom installations, we recommend using [one of our Docker images](https://docs.photoprism.app/getting-started/docker-compose/) to run PhotoPrism on a private server or NAS device.
|
||||
|
||||
Also note that the minimum required glibc version is 2.35, so for example Ubuntu 22.04 and Debian Bookworm will work, but older Linux distributions may not be compatible.
|
||||
Also note that the minimum required glibc version is 2.35, so for example Ubuntu 22.04 and Debian Bookworm will work, but older Linux distributions may not be compatible. Current package builds also require **libvips 8.14+** for thumbnail processing.
|
||||
|
||||
### Usage
|
||||
|
||||
|
|
@ -80,14 +80,30 @@ PhotoPrism packages bundle TensorFlow 2.18.0 and, starting with the December 202
|
|||
|
||||
Install the following packages **before** running PhotoPrism so that thumbnailing, metadata extraction, and the SQLite fallback database work out of the box:
|
||||
|
||||
| Distribution family | Command |
|
||||
|------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Debian / Ubuntu | `sudo apt install libvips42t64 libimage-exiftool-perl ffmpeg sqlite3 tzdata`<br/>Use `libvips42` or, as a fallback, `libvips-dev` on older releases. |
|
||||
| Fedora / RHEL / Alma / Rocky | `sudo dnf install vips perl-Image-ExifTool ffmpeg sqlite tzdata` |
|
||||
| openSUSE | `sudo zypper install vips perl-Image-ExifTool ffmpeg sqlite3 tzdata` |
|
||||
| Distribution family | Command |
|
||||
|------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Debian / Ubuntu | `sudo apt install libvips42t64 libimage-exiftool-perl ffmpeg sqlite3 tzdata`<br/>Use `libvips42` on releases without `libvips42t64`, but make sure the installed version is **8.14+**. |
|
||||
| Fedora / RHEL / Alma / Rocky | `sudo dnf install vips perl-Image-ExifTool ffmpeg sqlite tzdata` |
|
||||
| openSUSE | `sudo zypper install vips perl-Image-ExifTool ffmpeg sqlite3 tzdata` |
|
||||
|
||||
These packages pull in the full libvips stack (GLib, libjpeg/libtiff/libwebp, archive/zstd, etc.) that the PhotoPrism binary links against. Run `ldd /opt/photoprism/bin/photoprism` if you need to diagnose missing libraries on custom distributions.
|
||||
|
||||
#### Installing Newer libvips on Ubuntu 22.04 (Jammy)
|
||||
|
||||
Ubuntu 22.04 ships libvips 8.12 by default, which is too old for current package builds. In that case, install a newer backport package first:
|
||||
|
||||
```bash
|
||||
bash <(curl -s https://raw.githubusercontent.com/photoprism/photoprism/develop/scripts/dist/install-libvips.sh)
|
||||
vips --version
|
||||
```
|
||||
|
||||
If you already have this repository checked out locally, you can run the same installer script directly:
|
||||
|
||||
```bash
|
||||
sudo bash scripts/dist/install-libvips.sh
|
||||
vips --version
|
||||
```
|
||||
|
||||
#### Recommended Extras
|
||||
|
||||
For extended RAW processing, HEIF/HEIC support, and database scalability we recommend installing:
|
||||
|
|
@ -95,6 +111,7 @@ For extended RAW processing, HEIF/HEIC support, and database scalability we reco
|
|||
- MariaDB or MariaDB Server (external database)
|
||||
- Darktable and/or RawTherapee (RAW converters)
|
||||
- ImageMagick (CLI utilities)
|
||||
- libvips 8.14+ (required; Ubuntu 22.04 users should install a backport with `scripts/dist/install-libvips.sh` if distro packages are too old)
|
||||
- libheif (prefer the up-to-date binaries from [dl.photoprism.app/dist/libheif/](https://dl.photoprism.app/dist/libheif/); install with `bash <(curl -s https://raw.githubusercontent.com/photoprism/photoprism/develop/scripts/dist/install-libheif.sh)` when distro packages are outdated)
|
||||
- librsvg2-bin or librsvg2-tools (SVG conversion helpers)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue