mirror of
https://github.com/photoprism/photoprism.git
synced 2026-01-23 02:24:24 +00:00
Merge remote-tracking branch 'upstream/develop' into feature/custom-tf-model-127
This commit is contained in:
commit
38956e0f4a
409 changed files with 34588 additions and 23182 deletions
8
scripts/dist/Makefile
vendored
8
scripts/dist/Makefile
vendored
|
|
@ -43,8 +43,12 @@ intel: update install-intel
|
|||
install-intel-graphics: intel
|
||||
intel-graphics: intel
|
||||
install-intel:
|
||||
@echo "Installing Intel Drivers..."
|
||||
apt-get -qq install intel-opencl-icd intel-media-va-driver-non-free i965-va-driver-shaders mesa-va-drivers libmfx-dev libmfx-gen-dev va-driver-all vainfo libva-dev
|
||||
@echo "Installing Intel GPU Drivers..."
|
||||
apt-get -qq install intel-opencl-icd intel-media-va-driver-non-free i965-va-driver-shaders mesa-va-drivers libmfx-gen1.2 va-driver-all vainfo libva2
|
||||
amd: update install-amd
|
||||
install-amd:
|
||||
@echo "Installing AMD VA-API GPU Drivers..."
|
||||
apt-get -qq install mesa-va-drivers vainfo libva2
|
||||
clitools: update install-clitools
|
||||
cli-tools: clitools
|
||||
nano: clitools
|
||||
|
|
|
|||
9
scripts/dist/install-gpu.sh
vendored
9
scripts/dist/install-gpu.sh
vendored
|
|
@ -50,8 +50,8 @@ esac
|
|||
for t in ${GPU_DETECTED[@]}; do
|
||||
case $t in
|
||||
i915 | i965 | intel | opencl | icd)
|
||||
echo "Installing Intel Drivers..."
|
||||
apt-get -qq install intel-opencl-icd intel-media-va-driver-non-free i965-va-driver-shaders mesa-va-drivers libmfx-dev libmfx-gen-dev va-driver-all vainfo libva-dev
|
||||
echo "Installing Intel GPU Drivers..."
|
||||
apt-get -qq install intel-opencl-icd intel-media-va-driver-non-free i965-va-driver-shaders mesa-va-drivers libmfx-gen1.2 va-driver-all vainfo libva2
|
||||
;;
|
||||
|
||||
nvidia)
|
||||
|
|
@ -59,10 +59,9 @@ for t in ${GPU_DETECTED[@]}; do
|
|||
;;
|
||||
|
||||
amdgpu)
|
||||
echo "Installing AMD VA-API Drivers..."
|
||||
apt-get -qq install mesa-va-drivers vainfo libva-dev
|
||||
echo "Installing AMD VA-API GPU Drivers..."
|
||||
apt-get -qq install mesa-va-drivers vainfo libva2
|
||||
;;
|
||||
|
||||
|
||||
"null")
|
||||
# ignore
|
||||
|
|
|
|||
14
scripts/dist/install-libheif.sh
vendored
14
scripts/dist/install-libheif.sh
vendored
|
|
@ -15,7 +15,7 @@ fi
|
|||
DESTDIR=$(realpath "${1:-/usr/local}")
|
||||
|
||||
# In addition, you can specify a custom version to be installed as the second argument.
|
||||
LIBHEIF_VERSION=${2:-v1.19.5}
|
||||
LIBHEIF_VERSION=${2:-v1.19.7}
|
||||
|
||||
# Determine target architecture.
|
||||
if [[ $PHOTOPRISM_ARCH ]]; then
|
||||
|
|
@ -73,14 +73,18 @@ echo "ARCHIVE: $ARCHIVE"
|
|||
echo "DESTDIR: $DESTDIR"
|
||||
echo "------------------------------------------------"
|
||||
|
||||
echo "Extracting \"$URL\" to \"$DESTDIR\"."
|
||||
curl -fsSL "$URL" | tar --overwrite --mode=755 -xz -C "$DESTDIR"
|
||||
if curl -fsSL "$URL" | tar --overwrite --mode=755 -xz -C "$DESTDIR" 2> /dev/null; then
|
||||
echo "✅ Extracted \"$URL\" to \"$DESTDIR\""
|
||||
else
|
||||
echo "❌ libheif binaries are not yet available for this architecture or distribution"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ $DESTDIR == "/usr" || $DESTDIR == "/usr/local" ]]; then
|
||||
echo "Running \"ldconfig\"."
|
||||
echo "Running \"ldconfig\"..."
|
||||
ldconfig
|
||||
else
|
||||
echo "Running \"ldconfig -n $DESTDIR/lib\"."
|
||||
echo "Running \"ldconfig -n $DESTDIR/lib\"..."
|
||||
ldconfig -n "$DESTDIR/lib"
|
||||
fi
|
||||
|
||||
|
|
|
|||
7
scripts/dist/install-tensorflow.sh
vendored
7
scripts/dist/install-tensorflow.sh
vendored
|
|
@ -84,6 +84,9 @@ if [[ $TF_DRIVER == "auto" ]]; then
|
|||
elif [[ $(echo "${CPU_DETECTED}" | jq -r '.[0].capabilities.avx') == "true" ]]; then
|
||||
TF_DRIVER="avx"
|
||||
echo "✅ Your CPU supports AVX vector instructions"
|
||||
elif [[ $(echo "${CPU_DETECTED}" | jq -r '.[0].capabilities.ssse3') == "true" ]]; then
|
||||
TF_DRIVER="ssse3"
|
||||
echo "✅ Your CPU supports SSSE3 instructions"
|
||||
else
|
||||
TF_DRIVER=""
|
||||
echo "❌ Your CPU does not support any AVX instructions"
|
||||
|
|
@ -114,10 +117,10 @@ else
|
|||
fi
|
||||
|
||||
if [[ $DESTDIR == "/usr" || $DESTDIR == "/usr/local" ]]; then
|
||||
echo "Running \"ldconfig\"."
|
||||
echo "Running \"ldconfig\"..."
|
||||
ldconfig
|
||||
else
|
||||
echo "Running \"ldconfig -n $DESTDIR/lib\"."
|
||||
echo "Running \"ldconfig -n $DESTDIR/lib\"..."
|
||||
ldconfig -n "$DESTDIR/lib"
|
||||
fi
|
||||
|
||||
|
|
|
|||
82
scripts/dist/install-yt-dlp.sh
vendored
Executable file
82
scripts/dist/install-yt-dlp.sh
vendored
Executable file
|
|
@ -0,0 +1,82 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Installs the yt-dlp binary, a vector search engine, on Linux.
|
||||
# bash <(curl -s https://raw.githubusercontent.com/photoprism/photoprism/develop/scripts/dist/install-yt-dlp.sh)
|
||||
|
||||
set -e
|
||||
|
||||
# Show usage information if first argument is --help.
|
||||
if [[ ${1} == "--help" ]]; then
|
||||
echo "Usage: ${0##*/} [destdir] [version]" 1>&2
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# You can provide a custom installation directory as the first argument.
|
||||
DESTDIR=$(realpath "${1:-/usr/local}")
|
||||
|
||||
# Determine target architecture.
|
||||
if [[ $PHOTOPRISM_ARCH ]]; then
|
||||
SYSTEM_ARCH=$PHOTOPRISM_ARCH
|
||||
else
|
||||
SYSTEM_ARCH=$(uname -m)
|
||||
fi
|
||||
|
||||
DESTARCH=${BUILD_ARCH:-$SYSTEM_ARCH}
|
||||
|
||||
case $DESTARCH in
|
||||
amd64 | AMD64 | x86_64 | x86-64)
|
||||
DESTARCH=x86_64
|
||||
;;
|
||||
|
||||
arm64 | ARM64 | aarch64)
|
||||
DESTARCH=aarch64
|
||||
;;
|
||||
|
||||
arm | ARM | aarch | armv7l | armhf)
|
||||
DESTARCH=armv7l
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unsupported Machine Architecture: \"$DESTARCH\"" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
. /etc/os-release
|
||||
|
||||
# Abort if not executed as root.
|
||||
if [[ $(id -u) != "0" ]] && [[ $DESTDIR == "/usr" || $DESTDIR == "/usr/local" ]]; then
|
||||
echo "Error: Run ${0##*/} as root to install in a system directory!" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Installing yt-dlp for ${DESTARCH^^}..."
|
||||
|
||||
# Alternatively, users can specify a custom version to install as the second argument.
|
||||
GITHUB_LATEST=$(curl --silent "https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
|
||||
VERSION=${2:-$GITHUB_LATEST}
|
||||
BINARY="yt-dlp_linux"
|
||||
|
||||
if [[ $DESTARCH != "x86_64" ]]; then
|
||||
BINARY="${BINARY}_${DESTARCH}"
|
||||
fi
|
||||
|
||||
GITHUB_URL="https://github.com/yt-dlp/yt-dlp/releases/download/${VERSION}/${BINARY}"
|
||||
DESTBIN="${DESTDIR}/bin/yt-dlp"
|
||||
|
||||
echo "------------------------------------------------"
|
||||
echo "VERSION : ${VERSION}"
|
||||
echo "LATEST : ${GITHUB_LATEST}"
|
||||
echo "DOWNLOAD: ${GITHUB_URL}"
|
||||
echo "DESTDIR : ${DESTDIR}"
|
||||
echo "DESTBIN : ${DESTBIN}"
|
||||
echo "------------------------------------------------"
|
||||
|
||||
echo "Downloading the yt-dlp binary to \"${DESTBIN}\"..."
|
||||
mkdir -p "${DESTDIR}"
|
||||
curl -fsSL "${GITHUB_URL}" -o "${DESTBIN}"
|
||||
|
||||
echo "Changing permissions of \"${DESTBIN}\" to 755..."
|
||||
chmod 755 "${DESTBIN}"
|
||||
|
||||
echo "Done."
|
||||
Loading…
Add table
Add a link
Reference in a new issue