mirror of
https://github.com/photoprism/photoprism.git
synced 2025-11-02 13:04:17 +08:00
Scripts: Update success and error messages
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
4
Makefile
4
Makefile
@@ -245,7 +245,7 @@ dep-list:
|
|||||||
go list -u -m -json all | go-mod-outdated -direct
|
go list -u -m -json all | go-mod-outdated -direct
|
||||||
npm: dep-npm npm-version
|
npm: dep-npm npm-version
|
||||||
npm-version:
|
npm-version:
|
||||||
@echo "✅ Installed npm $$(npm --version)"
|
@echo "📦 Installed npm $$(npm --version)."
|
||||||
dep-npm:
|
dep-npm:
|
||||||
@echo "Installing NPM package manager..."
|
@echo "Installing NPM package manager..."
|
||||||
@if command -v sudo >/dev/null 2>&1; then \
|
@if command -v sudo >/dev/null 2>&1; then \
|
||||||
@@ -259,7 +259,7 @@ dep-js:
|
|||||||
(cd frontend && npm ci --ignore-scripts --no-update-notifier --no-audit)
|
(cd frontend && npm ci --ignore-scripts --no-update-notifier --no-audit)
|
||||||
codex: dep-codex codex-version
|
codex: dep-codex codex-version
|
||||||
codex-version:
|
codex-version:
|
||||||
@echo "✅ Installed $$(codex --version)"
|
@echo "🤖 Installed $$(codex --version)."
|
||||||
dep-codex:
|
dep-codex:
|
||||||
@echo "Installing Codex CLI..."
|
@echo "Installing Codex CLI..."
|
||||||
@[ -n "$(CODEX_HOME)" ] && [ "$(CODEX_HOME)" != "/" ] && install -d -m 700 -- "$(CODEX_HOME)" || true
|
@[ -n "$(CODEX_HOME)" ] && [ "$(CODEX_HOME)" != "/" ] && install -d -m 700 -- "$(CODEX_HOME)" || true
|
||||||
|
|||||||
@@ -530,12 +530,12 @@ func (c *Config) AssertTestData(t *testing.T) {
|
|||||||
t.Logf("testdata: dir %s exists (%s)", clean.Log(dir),
|
t.Logf("testdata: dir %s exists (%s)", clean.Log(dir),
|
||||||
report.Bool(fs.DirIsEmpty(dir), "empty", "not empty"))
|
report.Bool(fs.DirIsEmpty(dir), "empty", "not empty"))
|
||||||
} else {
|
} else {
|
||||||
t.Logf("testdata: dir %s is missing %s, but required", clean.Log(dir), report.CrossMark)
|
t.Logf("testdata: dir %s is missing %s, but required", clean.Log(dir), report.Cross)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
reportErr := func(funcName string) {
|
reportErr := func(funcName string) {
|
||||||
t.Errorf("testdata: *Config.%s() must not return an empty string %s", funcName, report.CrossMark)
|
t.Errorf("testdata: *Config.%s() must not return an empty string %s", funcName, report.Cross)
|
||||||
}
|
}
|
||||||
|
|
||||||
if dir := c.AssetsPath(); dir != "" {
|
if dir := c.AssetsPath(); dir != "" {
|
||||||
|
|||||||
@@ -6,6 +6,9 @@ const (
|
|||||||
Yes = "Yes"
|
Yes = "Yes"
|
||||||
No = "No"
|
No = "No"
|
||||||
NotAssigned = "n/a"
|
NotAssigned = "n/a"
|
||||||
CheckMark = "✅"
|
Check = "✅"
|
||||||
CrossMark = "❌"
|
Cross = "❌"
|
||||||
|
Star = "⭐"
|
||||||
|
Robot = "🤖"
|
||||||
|
Package = "📦"
|
||||||
)
|
)
|
||||||
|
|||||||
20
scripts/dist/create-users.sh
vendored
20
scripts/dist/create-users.sh
vendored
@@ -12,29 +12,29 @@ echo "Creating default users and groups..."
|
|||||||
|
|
||||||
# create groups 'www-data', 'video', 'davfs2', and 'render'
|
# create groups 'www-data', 'video', 'davfs2', and 'render'
|
||||||
groupadd -f -r -g 33 www-data 1>&2
|
groupadd -f -r -g 33 www-data 1>&2
|
||||||
echo "✅ added group www-data (33)"
|
echo "✅ Added group www-data (33)."
|
||||||
groupadd -f -r -g 44 video 1>&2
|
groupadd -f -r -g 44 video 1>&2
|
||||||
echo "✅ added group video (44)"
|
echo "✅ Added group video (44)."
|
||||||
groupadd -f -r -g 105 davfs2 1>&2
|
groupadd -f -r -g 105 davfs2 1>&2
|
||||||
echo "✅ added group davfs2 (105)"
|
echo "✅ Added group davfs2 (105)."
|
||||||
groupadd -f -r -g 109 renderd 1>&2
|
groupadd -f -r -g 109 renderd 1>&2
|
||||||
echo "✅ added group renderd (109)"
|
echo "✅ Added group renderd (109)."
|
||||||
groupadd -f -r -g 115 render 1>&2
|
groupadd -f -r -g 115 render 1>&2
|
||||||
echo "✅ added group render (115)"
|
echo "✅ Added group render (115)."
|
||||||
groupadd -f -r -g 116 ssl-cert 1>&2
|
groupadd -f -r -g 116 ssl-cert 1>&2
|
||||||
echo "✅ added group ssl-cert (116)"
|
echo "✅ Added group ssl-cert (116)."
|
||||||
|
|
||||||
# create group 'videodriver'
|
# create group 'videodriver'
|
||||||
groupdel -f 937 >/dev/null 2>&1
|
groupdel -f 937 >/dev/null 2>&1
|
||||||
groupadd -f -r -g 937 videodriver 1>&2
|
groupadd -f -r -g 937 videodriver 1>&2
|
||||||
echo "✅ added group videodriver (937)"
|
echo "✅ Added group videodriver (937)."
|
||||||
|
|
||||||
# create group 'photoprism'
|
# create group 'photoprism'
|
||||||
groupdel -f ubuntu >/dev/null 2>&1
|
groupdel -f ubuntu >/dev/null 2>&1
|
||||||
groupdel -f photoprism >/dev/null 2>&1
|
groupdel -f photoprism >/dev/null 2>&1
|
||||||
groupdel -f 1000 >/dev/null 2>&1
|
groupdel -f 1000 >/dev/null 2>&1
|
||||||
groupadd -f -g 1000 photoprism 1>&2
|
groupadd -f -g 1000 photoprism 1>&2
|
||||||
echo "✅ added group photoprism (1000)"
|
echo "✅ Added group photoprism (1000)."
|
||||||
|
|
||||||
# add existing www-data user to groups
|
# add existing www-data user to groups
|
||||||
usermod -a -G photoprism,video,davfs2,renderd,render,ssl-cert,videodriver www-data
|
usermod -a -G photoprism,video,davfs2,renderd,render,ssl-cert,videodriver www-data
|
||||||
@@ -42,14 +42,14 @@ usermod -a -G photoprism,video,davfs2,renderd,render,ssl-cert,videodriver www-da
|
|||||||
# create user 'videodriver'
|
# create user 'videodriver'
|
||||||
userdel -r -f videodriver >/dev/null 2>&1
|
userdel -r -f videodriver >/dev/null 2>&1
|
||||||
useradd -u 937 -r -N -g 937 -G photoprism,www-data,video,davfs2,renderd,render,ssl-cert -s /bin/bash -m -d "/home/videodriver" videodriver
|
useradd -u 937 -r -N -g 937 -G photoprism,www-data,video,davfs2,renderd,render,ssl-cert -s /bin/bash -m -d "/home/videodriver" videodriver
|
||||||
echo "✅ added user videodriver (937)"
|
echo "✅ Added user videodriver (937)."
|
||||||
|
|
||||||
# create user 'photoprism'
|
# create user 'photoprism'
|
||||||
userdel -r -f ubuntu >/dev/null 2>&1
|
userdel -r -f ubuntu >/dev/null 2>&1
|
||||||
userdel -r -f photoprism >/dev/null 2>&1
|
userdel -r -f photoprism >/dev/null 2>&1
|
||||||
userdel -r -f 1000 >/dev/null 2>&1
|
userdel -r -f 1000 >/dev/null 2>&1
|
||||||
useradd -u 1000 -N -g photoprism -G www-data,video,davfs2,renderd,render,ssl-cert,videodriver -s /bin/bash -m -d "/home/photoprism" photoprism
|
useradd -u 1000 -N -g photoprism -G www-data,video,davfs2,renderd,render,ssl-cert,videodriver -s /bin/bash -m -d "/home/photoprism" photoprism
|
||||||
echo "✅ added user photoprism (1000)"
|
echo "✅ Added user photoprism (1000)."
|
||||||
|
|
||||||
add_user()
|
add_user()
|
||||||
{
|
{
|
||||||
|
|||||||
2
scripts/dist/install-libheif.sh
vendored
2
scripts/dist/install-libheif.sh
vendored
@@ -76,7 +76,7 @@ echo "--------------------------------------------------------------------------
|
|||||||
if curl -fsSL "$URL" | tar --overwrite --mode=755 -xz -C "$DESTDIR" 2> /dev/null; then
|
if curl -fsSL "$URL" | tar --overwrite --mode=755 -xz -C "$DESTDIR" 2> /dev/null; then
|
||||||
echo "✅ Extracted \"$URL\" to \"$DESTDIR\""
|
echo "✅ Extracted \"$URL\" to \"$DESTDIR\""
|
||||||
else
|
else
|
||||||
echo "❌ libheif binaries are not yet available for this architecture or distribution"
|
echo "❌ No libheif binaries are available for this architecture or distribution."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
16
scripts/dist/install-tensorflow.sh
vendored
16
scripts/dist/install-tensorflow.sh
vendored
@@ -68,28 +68,28 @@ if [[ $TF_DRIVER == "auto" ]]; then
|
|||||||
|
|
||||||
if [[ $(echo "${CPU_DETECTED}" | jq -r '.[0].capabilities.avx512_vnni') == "true" ]]; then
|
if [[ $(echo "${CPU_DETECTED}" | jq -r '.[0].capabilities.avx512_vnni') == "true" ]]; then
|
||||||
TF_DRIVER="avx512"
|
TF_DRIVER="avx512"
|
||||||
echo "✅ Your CPU supports AVX512-VNNI Vector Neural Network Instructions"
|
echo "✅ Your CPU supports AVX512-VNNI Vector Neural Network Instructions."
|
||||||
if [[ $(lshw -c display -json 2>/dev/null | jq -r '.[0].configuration.driver') == "nvidia" ]]; then
|
if [[ $(lshw -c display -json 2>/dev/null | jq -r '.[0].configuration.driver') == "nvidia" ]]; then
|
||||||
echo "✅ You can optionally install the tensorflow-gpu version as an Nvidia GPU was detected"
|
echo "✅ You can optionally install the tensorflow-gpu version as an Nvidia GPU was detected."
|
||||||
fi
|
fi
|
||||||
elif [[ $(echo "${CPU_DETECTED}" | jq -r '.[0].capabilities.avx_vnni') == "true" ]]; then
|
elif [[ $(echo "${CPU_DETECTED}" | jq -r '.[0].capabilities.avx_vnni') == "true" ]]; then
|
||||||
TF_DRIVER="vnni"
|
TF_DRIVER="vnni"
|
||||||
echo "✅ Your CPU supports AVX-VNNI Vector Neural Network Instructions"
|
echo "✅ Your CPU supports AVX-VNNI Vector Neural Network Instructions."
|
||||||
if [[ $(lshw -c display -json 2>/dev/null | jq -r '.[0].configuration.driver') == "nvidia" ]]; then
|
if [[ $(lshw -c display -json 2>/dev/null | jq -r '.[0].configuration.driver') == "nvidia" ]]; then
|
||||||
echo "✅ You can optionally install the tensorflow-gpu version as an Nvidia GPU was detected"
|
echo "✅ You can optionally install the tensorflow-gpu version as an Nvidia GPU was detected."
|
||||||
fi
|
fi
|
||||||
elif [[ $(echo "${CPU_DETECTED}" | jq -r '.[0].capabilities.avx2') == "true" ]]; then
|
elif [[ $(echo "${CPU_DETECTED}" | jq -r '.[0].capabilities.avx2') == "true" ]]; then
|
||||||
TF_DRIVER="avx2"
|
TF_DRIVER="avx2"
|
||||||
echo "✅ Your CPU supports AVX2 vector instructions"
|
echo "✅ Your CPU supports AVX2 vector instructions."
|
||||||
elif [[ $(echo "${CPU_DETECTED}" | jq -r '.[0].capabilities.avx') == "true" ]]; then
|
elif [[ $(echo "${CPU_DETECTED}" | jq -r '.[0].capabilities.avx') == "true" ]]; then
|
||||||
TF_DRIVER="avx"
|
TF_DRIVER="avx"
|
||||||
echo "✅ Your CPU supports AVX vector instructions"
|
echo "✅ Your CPU supports AVX vector instructions."
|
||||||
elif [[ $(echo "${CPU_DETECTED}" | jq -r '.[0].capabilities.ssse3') == "true" ]]; then
|
elif [[ $(echo "${CPU_DETECTED}" | jq -r '.[0].capabilities.ssse3') == "true" ]]; then
|
||||||
TF_DRIVER="ssse3"
|
TF_DRIVER="ssse3"
|
||||||
echo "✅ Your CPU supports SSSE3 instructions"
|
echo "✅ Your CPU supports SSSE3 instructions."
|
||||||
else
|
else
|
||||||
TF_DRIVER=""
|
TF_DRIVER=""
|
||||||
echo "❌ Your CPU does not support any AVX instructions"
|
echo "❌ Your CPU does not support any AVX instructions."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user