mirror of
https://github.com/YunoHost-Apps/immich_ynh.git
synced 2024-09-03 20:36:24 +02:00
Revert Build venv with immich user
This commit is contained in:
parent
a0737899a9
commit
9b23c02a54
1 changed files with 3 additions and 10 deletions
|
@ -157,25 +157,18 @@ myynh_install_immich() {
|
||||||
# Install immich-machine-learning
|
# Install immich-machine-learning
|
||||||
cd "$source_dir/machine-learning"
|
cd "$source_dir/machine-learning"
|
||||||
mkdir -p "$install_dir/app/machine-learning"
|
mkdir -p "$install_dir/app/machine-learning"
|
||||||
chmod 750 "$install_dir/app/machine-learning"
|
$py_app_version -m venv "$install_dir/app/machine-learning/venv"
|
||||||
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"
|
|
||||||
(
|
(
|
||||||
# activate the virtual environment
|
# activate the virtual environment
|
||||||
set +o nounset
|
set +o nounset
|
||||||
source "$install_dir/app/machine-learning/venv/bin/activate"
|
source "$install_dir/app/machine-learning/venv/bin/activate"
|
||||||
set -o nounset
|
set -o nounset
|
||||||
|
|
||||||
# add pip
|
|
||||||
ynh_exec_as $app "$install_dir/app/machine-learning/venv/bin/python3" -m ensurepip
|
|
||||||
|
|
||||||
# add poetry
|
# 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
|
# 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/ann" "$install_dir/app/machine-learning/"
|
||||||
cp -a "$source_dir/machine-learning/app" "$install_dir/app/machine-learning/"
|
cp -a "$source_dir/machine-learning/app" "$install_dir/app/machine-learning/"
|
||||||
|
|
Loading…
Reference in a new issue