Skip to content
This repository was archived by the owner on Jul 27, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion install-librephotos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ curl -SL https://github.com/LibrePhotos/librephotos-docker/releases/download/0.1
curl -SL https://github.com/LibrePhotos/librephotos-docker/releases/download/0.1/im2txt.tar.gz | tar -zxC $BASE_DATA/data_models/
curl -SL https://github.com/LibrePhotos/librephotos-docker/releases/download/0.1/clip-embeddings.tar.gz | tar -zxC $BASE_DATA/data_models/
mkdir -p ~/.cache/torch/hub/checkpoints/
# Make sure pip can do it's work
rm /usr/lib/python3.11/EXTERNALLY-MANAGED

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe use rm -f.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also had the issue detailed in #62 - At least for me, this fix alone didn't work. I needed to remove the EXTERNALLY-MANAGED file PRIOR to running the install.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand."EXTERNALLY-MANAGED" does not exist for me and "rm -f /usr/lib/python3.11/EXTERNALLY-MANAGED" avoids the shell script to abort.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think that's needed. To install packages for python 3.11 we are using --break-system-packages pip flag. See backend/Dockerfile.

curl -SL https://download.pytorch.org/models/resnet152-b121ed2d.pth -o ~/.cache/torch/hub/checkpoints/resnet152-b121ed2d.pth
pip3 install --no-cache-dir torch torchvision --extra-index-url https://download.pytorch.org/whl/cpu
pip3 install -v --install-option="--no" --install-option="DLIB_USE_CUDA" dlib
Expand All @@ -142,7 +144,7 @@ EOF

# POST INSTALL

usermod -a librephotos
usermod -a librephotos -G librephotos
[ -d /usr/lib/librephotos/bin ] || mkdir -p /usr/lib/librephotos/bin
cp resources/bin/* /usr/lib/librephotos/bin/
ln -fs /usr/lib/librephotos/bin/librephotos-cli /usr/sbin/librephotos-cli
Expand Down