From 9b23c02a5461d1306c3774d15d00895f2bcbcb99 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 2 Apr 2024 23:15:32 +0200 Subject: [PATCH] Revert Build venv with immich user --- scripts/_common.sh | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index b539637..9b36bc4 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -157,25 +157,18 @@ myynh_install_immich() { # Install immich-machine-learning cd "$source_dir/machine-learning" mkdir -p "$install_dir/app/machine-learning" - chmod 750 "$install_dir/app/machine-learning" - chmod -R o-rwx "$install_dir/app/machine-learning" - chown -R $app:$app "$install_dir/app/machine-learning" - - ynh_exec_as $app $py_app_version -m venv "$install_dir/app/machine-learning/venv" + $py_app_version -m venv "$install_dir/app/machine-learning/venv" ( # activate the virtual environment set +o nounset source "$install_dir/app/machine-learning/venv/bin/activate" set -o nounset - # add pip - ynh_exec_as $app "$install_dir/app/machine-learning/venv/bin/python3" -m ensurepip - # add poetry - ynh_exec_warn_less ynh_exec_as $app "$install_dir/app/machine-learning/venv/bin/pip3" install --upgrade poetry + ynh_exec_warn_less "$install_dir/app/machine-learning/venv/bin/pip3" install --upgrade poetry # poetry install - ynh_exec_warn_less ynh_exec_as $app "$install_dir/app/machine-learning/venv/bin/poetry" install --no-root --with dev --with cpu + ynh_exec_warn_less "$install_dir/app/machine-learning/venv/bin/poetry" install --no-root --with dev --with cpu ) cp -a "$source_dir/machine-learning/ann" "$install_dir/app/machine-learning/" cp -a "$source_dir/machine-learning/app" "$install_dir/app/machine-learning/"