Closed marco-lia-blog closed 1 year ago
I was able to workaround this by mounting a new persistent volume in /data_models and redownloading the contents of the original data_models directory in a poststart hook and changing permissionsin the backend as in:
spec:
containers:
- name: backend
image: backend-placeholder
lifecycle:
postStart:
exec:
command: ["/bin/sh", "-c", "curl -SL https://github.com/LibrePhotos/librephotos-docker/releases/download/0.1/places365.tar.gz | tar -zxC /data_models/ && \
curl -SL https://github.com/LibrePhotos/librephotos-docker/releases/download/0.1/im2txt.tar.gz | tar -zxC /data_models/ && \
curl -SL https://github.com/LibrePhotos/librephotos-docker/releases/download/0.1/clip-embeddings.tar.gz | tar -zxC /data_models/ && \
chmod -R 777 /data_models/clip-embeddings"]
…
But this is not a lasting solution because of the ridiculous long startup time for the deployment and the need for constant availability of the downloaded files.
I would suggest to change filepermissions inside of clip-embeddings.tar.gz.
I think this has been fixed in https://github.com/LibrePhotos/librephotos-docker/releases/tag/2023w12
I have an k8s deployment of librephotos running, using the LibrePhotos/librephotos-docker/k8s yamls. Everytime a user scans for new Images the calculate_clip_embeddings job fails and I have to delete it as admin user.
I found following error in the log:
Permissions of the path /data_models/clip-embeddings/0_CLIPModel are at least readable till to the file ViT-B-32.pt which is
If I understand the deployment correctly the application runs as nobody because of following seccontext in the backend.yaml:
Kustomize images are set as following:
Is that an error on my side or is there a chmod missing during image creation?