Coder Social home page Coder Social logo

librephotos / librephotos-docker Goto Github PK

View Code? Open in Web Editor NEW
145.0 10.0 99.0 1.67 MB

You can find here the Dockerfiles for the automated build process of LibrePhotos.

License: MIT License

Makefile 9.20% Dockerfile 62.55% Shell 28.25%
docker docker-compose deployment librephotos hacktoberfest

librephotos-docker's Introduction

For common users:

Follow the instructions here

For developers:

Follow the instructions here

To use your own container names:

Follow the normal instructions as per your chosen build, but after updating the .env file to choose your container names, run

make rename

Then you can resume following the normal instructions.

librephotos-docker's People

Contributors

akshay9 avatar alexislefebvre avatar anthonytam avatar ccesare avatar cjyar avatar derneuere avatar digitalwarrior avatar guysoft avatar jcminarro avatar mmartinortiz avatar nerodacles avatar parruc avatar polaroidkidd avatar quartztester avatar raulzc3 avatar scepterus avatar sickelap avatar tomlawesome avatar vlikebanana avatar woollymammal avatar yodatak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

librephotos-docker's Issues

Healthcheck on librephotos-frontend?

Hello-

I am attempting to get a healthcheck for the frontend container of librephotos but have run into an issue. It looks like the frontend image is built on halverneus/static-file-server, which in turn is built on scratch. This means it doesn't have curl or wget, which is what I typically use for my healthchecks to check http servers.

This means this doesn't work in my compose file:

  librephotos-frontend:
    image: reallibrephotos/librephotos-frontend:latest
    container_name: librephotos-frontend
    restart: unless-stopped
    environment:
      - TZ=America/Los_Angeles
    depends_on:
      - librephotos-backend
    networks:
      - librephotos_internal
    labels:
      - traefik.enable=false
    healthcheck:
      test: ["CMD", "wget --no-verbose --tries=1 --spider http://localhost:3000 || exit 1"]
      interval: 60s
      retries: 3
      start_period: 20s
      timeout: 15s

or something like

    healthcheck:
      test: ["CMD", "curl --fail http://localhost:3000 || exit 1"]
      interval: 60s
      retries: 3
      start_period: 20s
      timeout: 15s

I am wondering if a HEALTHCHECK can be added to the Dockerfile, since I don't see anyway to accomplish this using the docker-compose healthcheck vernacular. Here is one example on how to accomplish this with scratch based images.

Another solution would be to bake in wget or curl in your image, but unless you had some other reason for it, I understand not wanting it in there.

Thoughts?

Scan Photos not Working on Synology

Hi there this is the newbee trying librephotos on Synology DS720+ again...

I found my scan directory is not working,

image
now I set /data in frontend
image
then I put a image file under /data folder

but no matter how many times I tried to scan photos, it leaves 0 photos found
image

and BTW, is there any mothod I can upload my photo from frontend?

backend kept restart and missing SECRET_KEY

Hi there this is a newbee trying to run LibrePhoto on Synology Nas DS720+

I was following all the steps in documentation: https://docs.librephotos.com/1/standard_install/

And when I try to do my 1st login the backend container collapsed...

by reading the error message in container log, it seems like missing SECRET_KEY, screenshot as below

image

and by checking the variables of the container, it looks like I'm missing the secret key.. or maybe admin settings as well?

image

hopefully can find some solution for that, or would be fixed by re-install?

Not possible to pass a Redis password as an EVAR

If the user wishes to re-use an existing instance of Redis that has password authentication, that user is unable to do so because an option for a Redis password is not in the:

does it work passing the value manually (Kubernetes example):

env:
            - name: REDIS_PASSWORD
              value: "$password"

End user should be able to leverage basic password authentication for Redis, which would bring the authentication configuration for Librephoto to parity with the authentication on the backend.

Own existing Postgres server

Hi,

I set the variable dbHost to my own Postgres server, of course also dbUser and dbPass, removed

db:
image: postgres:13
container_name: db
restart: unless-stopped
environment:
- POSTGRES_USER=${dbUser}
- POSTGRES_PASSWORD=${dbPass}
- POSTGRES_DB=${dbName}
volumes:
- ${data}/db:/var/lib/postgresql/data
command: postgres -c fsync=off -c synchronous_commit=off -c full_page_writes=off -c random_page_cost=1.0
#Checking health of Postgres db
healthcheck:
test: psql -U ${dbUser} -d ${dbName} -c "SELECT 1;"
interval: 5s
timeout: 5s
retries: 5

and

# Wait for Postgres
depends_on:
db:
condition: service_healthy

from my docker-compose.yml and deployed it. I can access the Web-GUI but I can't login with my set admin credentials.
What's wrong or what I need else to do to run the librephotos DB on my own Postgres SQL Server?

Thank you,
Lukas

HEAVYWEIGHT_PROCESS

Hi

There is a new HEAVYWEIGHT_PROCESS in the env file:

# Number of workers, when scanning pictures. This setting can dramatically affect the ram usage.
# Each worker needs 800MB of RAM. Change at your own will. Default is 1.
HEAVYWEIGHT_PROCESS=1

Yet:
1/ I do not see any reference to this variable in the default yml file, normal?
2/ can you elaborate more on the difference with the number of gunniworkers ?

thx

rename not working as expected

I renamed containers name in .env and when I run make rename they aren't renamed in docker-compose.yml. I renamed them manually in docker-compose.yml but then if I run make rename they are overwrite.
Could it be that .env is not used?

Reading Makefile file it appear it is using librephotos.env and not .env

Permission issue with /data_models/clip-embeddings/0_CLIPModel/ViT-B-32.pt in k8s deployment

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:

2023-01-03 16:14:18,302 : batch_jobs.py : batch_calculate_clip_embedding : 87 : ERROR : Error in batch_calculate_clip_embedding: [Errno 13] Permission denied: '/data_models/clip-embeddings/0_CLIPModel/ViT-B-32.pt'

Permissions of the path /data_models/clip-embeddings/0_CLIPModel
are at least readable till to the file ViT-B-32.pt
which is

-rw------- 1 1000 1000 353976522 Jan  4  2021 ViT-B-32.pt

If I understand the deployment correctly the application runs as nobody because of following seccontext in the backend.yaml:

      securityContext:
        runAsUser: 65534
        runAsGroup: 65534
        fsGroup: 65534

Kustomize images are set as following:

images:
- name: backend-placeholder
  newName: reallibrephotos/librephotos
  newTag: 2022w50
- name: frontend-placeholder
  newName: reallibrephotos/librephotos-frontend
  newTag: 2022w50
- name: proxy-placeholder
  newName: reallibrephotos/librephotos-proxy
  newTag: 2022w45

Is that an error on my side or is there a chmod missing during image creation?

Docker Frontend permission error

I have a problem with the docker container. When I follow the instructions I get an error when starting the frontend:

ERROR: for frontend Cannot start service frontend: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/serve": stat /serve: permission denied: unknown
Can anyone help me with this?

I use Docker version 20.10.22, on Debian 10 (buster)

I found out that the Dockerfile contains the following information: ENTRYPOINT ["/serve"]
This is what will cause the error? Can I change the permissions? I do not know where /serve can be found.

bind mount failed

Start container librephotos_db_1 failed: {"message":"Bind mount failed: '/data/compose/16/librephotos/data' does not exists"}.

no idea where to start looking for this issue.
I'm happy I know how to start docker and portainer on my synology ... but don't expect any deeper knowledge about linux.

Perhaps it got to do with the hint "the full path must exist as it will not be created for you" in some sections of the .env file? But I'm lost about where to create them.

Scanning in SIngleton container

Hello,

I've tried to scan the library using the singleton container but did not succeed.
Using the recommended

sudo docker exec --user root CONTAINER_NAME python3 /usr/lib/librephotos/backend/manage.py scan

I get the following error

Traceback (most recent call last):
  File "/usr/lib/librephotos/backend/manage.py", line 8, in <module>
    from django.core.management import execute_from_command_line
ModuleNotFoundError: No module named 'django'

After looking at the install file I saw that it uses another user.
But using

docker exec --user librephotos CONTAINER_NAME  python3 /usr/lib/librephotos/backend/manage.py

I get the error message

Traceback (most recent call last):
  File "/usr/lib/librephotos/backend/manage.py", line 11, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/librephotos/.local/lib/python3.10/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/usr/lib/librephotos/.local/lib/python3.10/site-packages/django/core/management/__init__.py", line 345, in execute
    settings.INSTALLED_APPS
  File "/usr/lib/librephotos/.local/lib/python3.10/site-packages/django/conf/__init__.py", line 82, in __getattr__
    self._setup(name)
  File "/usr/lib/librephotos/.local/lib/python3.10/site-packages/django/conf/__init__.py", line 69, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/lib/librephotos/.local/lib/python3.10/site-packages/django/conf/__init__.py", line 170, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/lib/librephotos/backend/ownphotos/settings.py", line 26, in <module>
    raise NameError("Environnement variable not set :" + envvar)
NameError: Environnement variable not set :SECRET_KEY

I also tried loading the env file in /etc/librephotos/librephotos-backend.env but it does also not contain the secret key.

Did someone manage to use this functionality in the singleton container yet?

Build dlib as downloadable artifacts

In order to improve the speed of the build pipeline and reduce build dependencies, it would be great to create new Dockerfiles that would build dlib and faiss for arm64 and x64 and return as an artifact the binaries.

Then we can simplify the build pipeline by just downloading the artifacts, which would speed up the build pipeline by around two and a half hours.

I already started it and the Dockerfiles can be found in dependencies/dlib

Allow custom container names for frontend and backend

Hello, I'm currently working on adding LibrePhotos as an application to Runtipi as users have requested. However I'm unable to change the docker container names inside the compose file. This is due to reallibrephotos/librephotos-proxy only using frontend and backend as host names in nginx.

I cannot use those names as they are too common and would potentially collide with other services running.

No apparent way to reset/delete password

I followed the instructions to download and spin up the docker image:

https://docs.librephotos.com/1/standard_install/

I created an account, using my password manager to generate a password. Expecting it to save the login/password pair, I didn't copy the password. Now it wants me to login, but of course I can't, because the credentials aren't in my password manager. The user interface doesn't seem to provide a "recover/reset password" or "create account" link besides the original one.

I stopped the docker image, removed it from the dashboard then ran docker-compose up -d again. I expected to start over, but I'm just getting the standard login prompt again. I got more intrusive, stopping and deleting the librephotos-docker container as well as all images. Lather, rinse, repeat, and I'm back to the same login prompt with no way to create a new login or reset my password.

I've clearly failed to delete some crucial file somewhere. I would have thought all the state required for this would be inside the images. Can someone help me get restarted?

Rename myPhotos variable

Rename it to be consistent with the terms used in the actual software. It should be called "scanDirectory" or "data".

Docker error (frontend)

I used the official instruction for setting up the containers with Docker Compose. But I get this error:

`docker-compose up -d
WARNING: The HEAVYWEIGHT_PROCESS variable is not set. Defaulting to a blank string.
Building with native build. Learn about native build in Compose here: https://docs.docker.com/go/compose-native-build/
Creating network "librephotos-docker_default" with the default driver
Creating redis ... done
Creating frontend ... error
Creating db ... done

ERROR: for frontend Cannot start service frontend: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/serve": stat /serve: permission denied: unknown
Creating backend ... done

ERROR: for frontend Cannot start service frontend: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/serve": stat /serve: permis sion denied: unknown
ERROR: Encountered errors while bringing up the project.
`

Is there a solution for fixing this?

I use Docker version 20.10.21, build baeda1f on Debian GNU/Linux 10 (buster)

Greetings benni620

Scan only unscanned asserts

I initiated a scan with sudo docker exec --user root CONTAINER_NAME python3 manage.py scan stoped the scan before it reached 100% at around 70% re initiated the command scan restarts from 0%
is this the default behaviour?
Isnt there a way to scan only unscanned asserts?

Add latest tag on weekly releases

Now that we have weekly releases which tend to be more stable, we could use the tag latest for these releases. This would reduce errors that occur in the rolling dev tag.

Static values for Ports in the Proxy/nginx.conf make install in Kubernetes not possible

Host may be an issue as well

I think the Host IP can be set as an EVAR and the nginx.conf would pick it up.

i.e.

environment:
      - host=$hostIP

As seen in Proxy/nginx.conf: https://github.com/LibrePhotos/librephotos-docker/blob/main/proxy/nginx.conf

proxy_set_header Host $host;

But this same flexibility is not included in the ports that the backend and front end us.

eg:

proxy_pass http://frontend:3000/;

proxy_pass http://backend:8001;

This negates the possibility of a Docker user changing the ports Librephotos uses if 3000 and 8001 were already taken. In Kubernetes, unless the Kubernetes service load-balancer can provide static IPs (that's more complicated than it sounds, not possible for self hosted without complications), then the Kuberetes users are SOL.

Requested fix:

Set the host machine IP, as well as the backend and frontend ports as environmental variables.

Defaults would be localhost, 3000, and 8001, but non-default users could change those as needed.

postgrep's logs showed "ls: cannot access '/docker-entrypoint-initdb.d/': Operation not permitted"

When the db starts, the following error is displayed:
ls: cannot access '/docker-entrypoint-initdb.d/': Operation not permitted"

I added the privileged: true configuration into the db contianer in docker-compose.yml. Then the db container can work well.

db:
    image: postgres
    restart: always
    environment:
      - POSTGRES_USER=${dbUser}
      - POSTGRES_PASSWORD=${dbPass}
      - POSTGRES_DB=${dbName}
    privileged: true  ##### added it here
    volumes:
      - ${dbLocation}:/var/lib/postgresql/data
    command: postgres -c fsync=off -c synchronous_commit=off -c full_page_writes=off -c random_page_cost=1.0

I hope the solution can help others. Many thanks for this good project.

Can't change admin username

I just started using LibrePhotos so forgive me if I am missing something, but I am attempting to change the username from admin to Joe and am greeted with an "incorrect credentials" error message when I attempt to login.

Switching the username back to admin fixes it. I can change the password at least. I wasn't quite sure if I should post this here or in the main LibrePhotos repo, so I can make it over there if you'd like.

This was all on a brand new deployment. I looked through the logs and didn't see anything really useful, but am wondering if anyone else can reproduce this?

Can no longer mount proxy nginx conf

Greetings!

I have run into an issue when I recently attempted to upgrade my docker compose stack. I started getting errors where the proxy container couldn't find "frontend". This immediately seemed like an issue with the renaming of container names (which is required for me).

I had accomplished this previously by mounting the nginx conf the proxy container used file like -/home/me/librephotos/proxy/nginx.conf:/etc/nginx/nginx.conf and editing the names in there.

But it seems there was an update last month that changed the Dockerfile to overwrite this conf file on startup every time. Which is the exact behavior I am seeing. When I go edit that file on my host and spin up my stack, my changes get overwitten.

I am not sure if this is related to #80, maybe?

For now I have rolled back to a release in November, which has allowed me to spin my stack back up.

Any thoughts on how I can fix my deployment? Seems my current way of saving that nginx file to fix my named containers is incompatible with the way this project has moved forward.

backend docker fails

Backend docker throws error on a fresh install with default .env file

File "/usr/local/lib/python3.9/dist-packages/django/db/models/query.py", line 53, in __iter__
    results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
  File "/usr/local/lib/python3.9/dist-packages/django/db/models/sql/compiler.py", line 1154, in execute_sql
    cursor = self.connection.cursor()
  File "/usr/local/lib/python3.9/dist-packages/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/django/db/backends/base/base.py", line 259, in cursor
    return self._cursor()
  File "/usr/local/lib/python3.9/dist-packages/django/db/backends/base/base.py", line 235, in _cursor
    self.ensure_connection()
  File "/usr/local/lib/python3.9/dist-packages/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/django/db/backends/base/base.py", line 219, in ensure_connection
    self.connect()
  File "/usr/local/lib/python3.9/dist-packages/django/db/utils.py", line 90, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/usr/local/lib/python3.9/dist-packages/django/db/backends/base/base.py", line 219, in ensure_connection
    self.connect()
  File "/usr/local/lib/python3.9/dist-packages/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/django/db/backends/base/base.py", line 200, in connect
    self.connection = self.get_new_connection(conn_params)
  File "/usr/local/lib/python3.9/dist-packages/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/django/db/backends/postgresql/base.py", line 187, in get_new_connection
    connection = Database.connect(**conn_params)
  File "/usr/local/lib/python3.9/dist-packages/psycopg2/__init__.py", line 127, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
django.db.utils.OperationalError: FATAL:  password authentication failed for user "docker"

Invalid compose file due to depends_on

Hi, on a new instalation (first time user) I'm getting this error when executing docker-compose up -d:

ERROR: The Compose file './docker-compose.yml' is invalid because:
services.backend.depends_on contains an invalid type, it should be an array

If I change the version in the docker-compose.yml file from 3.8 to 2.2 then it does run ok.
Similar issue is described here:
https://stackoverflow.com/questions/71060072/docker-compose-depends-on-with-condition-invalid-type-should-be-an-array

Gunicorn Bind Address Invalid

When I try to start the backend container gunicorn keeps failing saying it cannot bind to "backend:8001" could this maybe be "0.0.0.0:8001" instead?

Running backend server...
production backend starting
[2021-06-16 16:57:36 +0000] [474] [INFO] Starting gunicorn 20.1.0
[2021-06-16 16:57:36 +0000] [474] [ERROR] Invalid address: ('backend', 8001)
[2021-06-16 16:57:36 +0000] [474] [ERROR] Retrying in 1 second.
[2021-06-16 16:57:37 +0000] [474] [ERROR] Invalid address: ('backend', 8001)
[2021-06-16 16:57:37 +0000] [474] [ERROR] Retrying in 1 second.
[2021-06-16 16:57:38 +0000] [474] [ERROR] Invalid address: ('backend', 8001)

Error starting docker, missing variables in .env and wrong version in composite file version

1. Clone repository (OK)

nando@zorinOS:~/bin/librephotos$ git clone https://github.com/LibrePhotos/librephotos-docker.git
Clonando en 'librephotos-docker'...
remote: Enumerating objects: 1188, done.
remote: Counting objects: 100% (492/492), done.
remote: Compressing objects: 100% (176/176), done.
remote: Total 1188 (delta 377), reused 340 (delta 283), pack-reused 696
Recibiendo objetos: 100% (1188/1188), 211.32 KiB | 1.51 MiB/s, listo.
Resolviendo deltas: 100% (598/598), listo.

2. Edit .env file (OK)

nando@zorinOS:~/bin/librephotos$ cd librephotos-docker
nando@zorinOS:~/bin/librephotos/librephotos-docker$ cp librephotos.env .env
nando@zorinOS:~/bin/librephotos/librephotos-docker$ vim .env

Here I edited the following lines:
# Location of your photos.
scanDirectory=***

# Internal data of LibrePhotos
data=***

3. Start docker (Failed)

nando@zorinOS:~/bin/librephotos/librephotos-docker$ docker-compose up -d
WARNING: The shhhhKey variable is not set. Defaulting to a blank string.
WARNING: The adminEmail variable is not set. Defaulting to a blank string.
WARNING: The userName variable is not set. Defaulting to a blank string.
WARNING: The userPass variable is not set. Defaulting to a blank string.
WARNING: The mapApiKey variable is not set. Defaulting to a blank string.
WARNING: The skipPatterns variable is not set. Defaulting to a blank string.
WARNING: The allowUpload variable is not set. Defaulting to a blank string.
WARNING: The HEAVYWEIGHT_PROCESS variable is not set. Defaulting to a blank string.
ERROR: Version in "./docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g "2.2" or "3.3") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.
For more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/

Add support for armhf 32 bits architecture

I use a Raspberry Pi 4 with a 32 bits architecture and I would like to use LibrePhotos. How can I build the different docker to be compatible with my hardware, please?

BR.

Ability to pass in backend and frontend names to containers

I'm running on a system with many containers, and using backend and frontend for container names creates the potential for a name collision. Allow for using arbitrary container names, passing in the names to the containers using environment variables. Or at least using librephotos-backend and librephotos-frontend instead.

FATAL: database "docker" does not exist

With the latest unmodified docker-compose.yml and librephotos.env files, on debian 11 with docker version 20.10.17, build 100c701. Following the instructions here exactly: https://docs.librephotos.com/1/standard_install/ yields the following endlessly repeating database error from the db container: FATAL: database "docker" does not exist

The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok


Success. You can now start the database server using:

    pg_ctl -D /var/lib/postgresql/data -l logfile start

initdb: warning: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
waiting for server to start....2022-07-07 21:50:07.918 UTC [49] LOG:  starting PostgreSQL 13.7 (Debian 13.7-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2022-07-07 21:50:07.918 UTC [49] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2022-07-07 21:50:07.919 UTC [50] LOG:  database system was shut down at 2022-07-07 21:50:07 UTC
2022-07-07 21:50:07.923 UTC [49] LOG:  database system is ready to accept connections
 done
server started
CREATE DATABASE


/usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*

2022-07-07 21:50:08.155 UTC [49] LOG:  received fast shutdown request
waiting for server to shut down....2022-07-07 21:50:08.155 UTC [49] LOG:  aborting any active transactions
2022-07-07 21:50:08.158 UTC [49] LOG:  background worker "logical replication launcher" (PID 56) exited with exit code 1
2022-07-07 21:50:08.158 UTC [51] LOG:  shutting down
2022-07-07 21:50:08.166 UTC [49] LOG:  database system is shut down
 done
server stopped

PostgreSQL init process complete; ready for start up.

2022-07-07 21:50:08.285 UTC [1] LOG:  starting PostgreSQL 13.7 (Debian 13.7-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2022-07-07 21:50:08.285 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2022-07-07 21:50:08.285 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2022-07-07 21:50:08.285 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2022-07-07 21:50:08.288 UTC [63] LOG:  database system was shut down at 2022-07-07 21:50:08 UTC
2022-07-07 21:50:08.294 UTC [1] LOG:  database system is ready to accept connections
2022-07-07 21:50:12.299 UTC [77] FATAL:  database "docker" does not exist
2022-07-07 21:50:16.000 UTC [78] ERROR:  relation "constance_config" does not exist at character 91
2022-07-07 21:50:16.000 UTC [78] STATEMENT:  SELECT "constance_config"."id", "constance_config"."key", "constance_config"."value" FROM "constance_config" WHERE "constance_config"."key" IN ('ALLOW_REGISTRATION', 'ALLOW_UPLOAD', 'SKIP_PATTERNS', 'HEAVYWEIGHT_PROCESS', 'MAP_API_KEY', 'IMAGE_DIRS')
2022-07-07 21:50:16.001 UTC [78] ERROR:  relation "constance_config" does not exist at character 91
2022-07-07 21:50:16.001 UTC [78] STATEMENT:  SELECT "constance_config"."id", "constance_config"."key", "constance_config"."value" FROM "constance_config" WHERE "constance_config"."key" = 'ALLOW_UPLOAD' LIMIT 21
2022-07-07 21:50:16.002 UTC [78] ERROR:  relation "constance_config" does not exist at character 91
2022-07-07 21:50:16.002 UTC [78] STATEMENT:  SELECT "constance_config"."id", "constance_config"."key", "constance_config"."value" FROM "constance_config" WHERE "constance_config"."key" = 'ALLOW_UPLOAD' LIMIT 21
2022-07-07 21:50:17.391 UTC [86] FATAL:  database "docker" does not exist
2022-07-07 21:50:18.793 UTC [87] ERROR:  relation "constance_config" does not exist at character 91
2022-07-07 21:50:18.793 UTC [87] STATEMENT:  SELECT "constance_config"."id", "constance_config"."key", "constance_config"."value" FROM "constance_config" WHERE "constance_config"."key" = 'ALLOW_UPLOAD' LIMIT 21
2022-07-07 21:50:18.793 UTC [87] ERROR:  relation "constance_config" does not exist at character 91
2022-07-07 21:50:18.793 UTC [87] STATEMENT:  SELECT "constance_config"."id", "constance_config"."key", "constance_config"."value" FROM "constance_config" WHERE "constance_config"."key" = 'ALLOW_UPLOAD' LIMIT 21
2022-07-07 21:50:22.481 UTC [95] FATAL:  database "docker" does not exist
2022-07-07 21:50:27.581 UTC [104] FATAL:  database "docker" does not exist
2022-07-07 21:50:32.774 UTC [118] FATAL:  database "docker" does not exist
2022-07-07 21:50:37.881 UTC [126] FATAL:  database "docker" does not exist
2022-07-07 21:50:43.014 UTC [134] FATAL:  database "docker" does not exist
2022-07-07 21:50:48.141 UTC [142] FATAL:  database "docker" does not exist
2022-07-07 21:50:53.317 UTC [150] FATAL:  database "docker" does not exist
2022-07-07 21:50:58.482 UTC [161] FATAL:  database "docker" does not exist
2022-07-07 21:51:03.656 UTC [175] FATAL:  database "docker" does not exist
2022-07-07 21:51:08.787 UTC [194] FATAL:  database "docker" does not exist
2022-07-07 21:51:13.923 UTC [204] FATAL:  database "docker" does not exist
2022-07-07 21:51:19.132 UTC [215] FATAL:  database "docker" does not exist
2022-07-07 21:51:24.344 UTC [226] FATAL:  database "docker" does not exist
2022-07-07 21:51:29.417 UTC [238] FATAL:  database "docker" does not exist
2022-07-07 21:51:34.559 UTC [249] FATAL:  database "docker" does not exist

Backend starts before postgres is ready

With the provided docker-compose.yml, the backend starts before postgress is ready (depends_on only waits for the container to be started), and the database initialisation scripts fail, leaving the database empty on the first run.

From docker.com: "Compose does not wait until a container is “ready” (whatever that means for your particular application) - only until it’s running."

Starting the services manually using:

  • docker compose up -d redis db
  • docker compose up -d backend frontend proxy
    seems to work (providing you wait for the db to be ready before starting the backend)

I'm not familiar enough with Django to work out how to put a "wait for db to be ready" line in the entrypoint.sh script, but I'm happy to test, or try and help if I can.

Edit: Just figured out a way to do it, and submitted a PR.

Backend startup has 2 failures/warnings

I have pulled the latest images, and the docker-compose.yml and .env files (updated only to point to my actual folders), Docker and Docker-Compose also updated to latest stable as of today.

The 2 relevant lines are:
backend_1 | statd: unrecognized service
and
backend_1 | /entrypoint.sh: line 10: 335 Illegal instruction (core dumped) python manage.py clear_cache

here's the full startup logs

db_1        |
db_1        | PostgreSQL Database directory appears to contain a database; Skipping initialization
db_1        |
db_1        | 2021-04-02 03:43:38.074 UTC [1] LOG:  starting PostgreSQL 13.2 (Debian 13.2-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
db_1        | 2021-04-02 03:43:38.074 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
db_1        | 2021-04-02 03:43:38.074 UTC [1] LOG:  listening on IPv6 address "::", port 5432
db_1        | 2021-04-02 03:43:38.074 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1        | 2021-04-02 03:43:38.078 UTC [26] LOG:  database system was shut down at 2021-04-02 03:41:38 UTC
backend_1   | statd: unrecognized service
db_1        | 2021-04-02 03:43:38.083 UTC [1] LOG:  database system is ready to accept connections
frontend_1  | installing frontend
proxy_1     | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
proxy_1     | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
proxy_1     | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
redis_1     | 1:C 02 Apr 2021 03:43:36.731 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis_1     | 1:C 02 Apr 2021 03:43:36.731 # Redis version=6.2.1, bits=64, commit=00000000, modified=0, pid=1, just started
redis_1     | 1:C 02 Apr 2021 03:43:36.731 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
proxy_1     | 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
redis_1     | 1:M 02 Apr 2021 03:43:36.733 * monotonic clock: POSIX clock_gettime
proxy_1     | 10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
redis_1     | 1:M 02 Apr 2021 03:43:36.733 * Running mode=standalone, port=6379.
redis_1     | 1:M 02 Apr 2021 03:43:36.733 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
redis_1     | 1:M 02 Apr 2021 03:43:36.733 # Server initialized
redis_1     | 1:M 02 Apr 2021 03:43:36.733 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
proxy_1     | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
redis_1     | 1:M 02 Apr 2021 03:43:36.734 * Loading RDB produced by version 6.2.1
redis_1     | 1:M 02 Apr 2021 03:43:36.734 * RDB age 139 seconds
redis_1     | 1:M 02 Apr 2021 03:43:36.734 * RDB memory usage when created 0.77 Mb
redis_1     | 1:M 02 Apr 2021 03:43:36.734 * DB loaded from disk: 0.000 seconds
redis_1     | 1:M 02 Apr 2021 03:43:36.734 * Ready to accept connections
proxy_1     | /docker-entrypoint.sh: Configuration complete; ready for start up
proxy_1     | 2021/04/02 03:43:42 [notice] 1#1: using the "epoll" event method
proxy_1     | 2021/04/02 03:43:42 [notice] 1#1: nginx/1.19.6
proxy_1     | 2021/04/02 03:43:42 [notice] 1#1: built by gcc 8.3.0 (Debian 8.3.0-6)
proxy_1     | 2021/04/02 03:43:42 [notice] 1#1: OS: Linux 4.15.0-136-generic
proxy_1     | 2021/04/02 03:43:42 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
proxy_1     | 2021/04/02 03:43:42 [notice] 1#1: start worker processes
proxy_1     | 2021/04/02 03:43:42 [notice] 1#1: start worker process 29
frontend_1  |
frontend_1  | up to date, audited 1642 packages in 11s
frontend_1  |
frontend_1  | 44 vulnerabilities (34 low, 5 moderate, 5 high)
frontend_1  |
frontend_1  | To address issues that do not require attention, run:
frontend_1  |   npm audit fix
frontend_1  |
frontend_1  | To address all issues possible (including breaking changes), run:
frontend_1  |   npm audit fix --force
frontend_1  |
frontend_1  | Some issues need review, and may require choosing
frontend_1  | a different dependency.
frontend_1  |
frontend_1  | Run `npm audit` for details.
frontend_1  | serving frontend
frontend_1  | productions running frontend
frontend_1  | INFO: Accepting connections at http://localhost:3000
backend_1   | /entrypoint.sh: line 10:   335 Illegal instruction     (core dumped) python manage.py clear_cache
backend_1   | Running backend server...
backend_1   | production backend starting
backend_1   | [2021-04-02 03:44:08 +0000] [482] [INFO] Starting gunicorn 20.1.0

LibrePhotos Docker Startup Errors

Hi there,

I'm trying to get LIbrePhotos running on some of my infrastructure, however I'm having some problems. When docker-compose up -d is called, the system never properly starts, and the backend container logs show many errors, examples below:

The frontend does start, but obviously isn't usable since the backend workers never get off the ground.

rqworker.log:

OpenBLAS blas_thread_init: pthread_create failed for thread 1 of 8: Operation not permitted
OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
OpenBLAS blas_thread_init: pthread_create failed for thread 2 of 8: Operation not permitted
OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
OpenBLAS blas_thread_init: pthread_create failed for thread 3 of 8: Operation not permitted
OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
OpenBLAS blas_thread_init: pthread_create failed for thread 4 of 8: Operation not permitted
OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
OpenBLAS blas_thread_init: pthread_create failed for thread 5 of 8: Operation not permitted
OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
OpenBLAS blas_thread_init: pthread_create failed for thread 6 of 8: Operation not permitted
OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
OpenBLAS blas_thread_init: pthread_create failed for thread 7 of 8: Operation not permitted
OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
OpenBLAS blas_thread_init: pthread_create failed for thread 1 of 8: Operation not permitted
OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
OpenBLAS blas_thread_init: pthread_create failed for thread 2 of 8: Operation not permitted
OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
OpenBLAS blas_thread_init: pthread_create failed for thread 3 of 8: Operation not permitted
OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
OpenBLAS blas_thread_init: pthread_create failed for thread 4 of 8: Operation not permitted
OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
OpenBLAS blas_thread_init: pthread_create failed for thread 5 of 8: Operation not permitted
OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
OpenBLAS blas_thread_init: pthread_create failed for thread 6 of 8: Operation not permitted
OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
OpenBLAS blas_thread_init: pthread_create failed for thread 7 of 8: Operation not permitted
OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/matplotlib/font_manager.py", line 1429, in
fontManager = json_load(_fmcache)
File "/usr/local/lib/python3.10/dist-packages/matplotlib/font_manager.py", line 1012, in json_load
with open(filename, 'r') as fh:
FileNotFoundError: [Errno 2] No such file or directory: '/root/.cache/matplotlib/fontlist-v330.json'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/code/manage.py", line 11, in
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.10/dist-packages/django/core/management/init.py", line 401, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.10/dist-packages/django/core/management/init.py", line 377, in execute
django.setup()
File "/usr/local/lib/python3.10/dist-packages/django/init.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python3.10/dist-packages/django/apps/registry.py", line 114, in populate
app_config.import_models()
File "/usr/local/lib/python3.10/dist-packages/django/apps/config.py", line 211, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/code/api/models/init.py", line 1, in
from api.models.album_auto import AlbumAuto
File "/code/api/models/album_auto.py", line 6, in
from api.models.person import Person
File "/code/api/models/person.py", line 7, in
from api.models.photo import Photo
File "/code/api/models/photo.py", line 21, in
from api.im2txt.sample import im2txt
File "/code/api/im2txt/sample.py", line 27, in
vocab = pickle.load(f)
File "/code/api/im2txt/build_vocab.py", line 5, in
from pycocotools.coco import COCO
File "/usr/local/lib/python3.10/dist-packages/pycocotools/coco.py", line 49, in
import matplotlib.pyplot as plt
File "/usr/local/lib/python3.10/dist-packages/matplotlib/pyplot.py", line 36, in
import matplotlib.colorbar
File "/usr/local/lib/python3.10/dist-packages/matplotlib/colorbar.py", line 44, in
import matplotlib.contour as contour
File "/usr/local/lib/python3.10/dist-packages/matplotlib/contour.py", line 16, in
import matplotlib.font_manager as font_manager
File "/usr/local/lib/python3.10/dist-packages/matplotlib/font_manager.py", line 1431, in
_rebuild()
File "/usr/local/lib/python3.10/dist-packages/matplotlib/font_manager.py", line 1424, in _rebuild
fontManager = FontManager()
File "/usr/local/lib/python3.10/dist-packages/matplotlib/font_manager.py", line 1069, in init
timer.start()
File "/usr/lib/python3.10/threading.py", line 928, in start
_start_new_thread(self._bootstrap, ())
RuntimeError: can't start new thread

gunicorn_image_stability.log:

OpenBLAS blas_thread_init: pthread_create failed for thread 1 of 8: Operation not permitted
OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
OpenBLAS blas_thread_init: pthread_create failed for thread 2 of 8: Operation not permitted
OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
OpenBLAS blas_thread_init: pthread_create failed for thread 3 of 8: Operation not permitted
OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
OpenBLAS blas_thread_init: pthread_create failed for thread 4 of 8: Operation not permitted
OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
OpenBLAS blas_thread_init: pthread_create failed for thread 5 of 8: Operation not permitted
OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
OpenBLAS blas_thread_init: pthread_create failed for thread 6 of 8: Operation not permitted
OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
OpenBLAS blas_thread_init: pthread_create failed for thread 7 of 8: Operation not permitted
OpenBLAS blas_thread_init: RLIMIT_NPROC -1 current, -1 max
Traceback (most recent call last):
File "src/gevent/greenlet.py", line 906, in gevent._gevent_cgreenlet.Greenlet.run
File "/usr/local/lib/python3.10/dist-packages/gevent/baseserver.py", line 398, in serve_forever
self.start()
File "/usr/local/lib/python3.10/dist-packages/gevent/baseserver.py", line 336, in start
self.init_socket()
File "/usr/local/lib/python3.10/dist-packages/gevent/pywsgi.py", line 1546, in init_socket
self.update_environ()
File "/usr/local/lib/python3.10/dist-packages/gevent/pywsgi.py", line 1558, in update_environ
name = socket.getfqdn(address[0])
File "/usr/local/lib/python3.10/dist-packages/gevent/_socketcommon.py", line 304, in getfqdn
hostname, aliases, _ = gethostbyaddr(name)
File "/usr/local/lib/python3.10/dist-packages/gevent/_socketcommon.py", line 276, in gethostbyaddr
return get_hub().resolver.gethostbyaddr(ip_address)
File "/usr/local/lib/python3.10/dist-packages/gevent/resolver/thread.py", line 66, in gethostbyaddr
return self.pool.apply(_socket.gethostbyaddr, args, kwargs)
File "/usr/local/lib/python3.10/dist-packages/gevent/pool.py", line 161, in apply
return self.spawn(func, *args, **kwds).get()
File "/usr/local/lib/python3.10/dist-packages/gevent/threadpool.py", line 526, in spawn
self.adjust()
File "/usr/local/lib/python3.10/dist-packages/gevent/threadpool.py", line 472, in adjust
self._adjust_step()
File "/usr/local/lib/python3.10/dist-packages/gevent/threadpool.py", line 452, in _adjust_step
self._add_thread()
File "/usr/local/lib/python3.10/dist-packages/gevent/threadpool.py", line 479, in _add_thread
self._WorkerGreenlet(self)
File "/usr/local/lib/python3.10/dist-packages/gevent/threadpool.py", line 100, in init
start_new_thread(self._begin, ())
RuntimeError: can't start new thread
2022-08-20T08:24:07Z <Greenlet at 0x7f43a27ba0e0: <bound method BaseServer.serve_forever of <WSGIServer at 0x7f439f306770 fileno=6 address=0.0.0.0:8002>>> failed with RuntimeError

This is a fresh Debian 10 system, I did check process limits, and there are none for the root user. The same .env config runs fine on two other machines, so I'm at a bit of a loss!

Cheers

Failed to install on a Raspberry 4 with 64bits architecture

I tried to install LibrePhotos-docker on my Raspberry Pi 4 64bits. Here what happened:

$ docker compose up -d
[+] Running 0/5
 ⠼ redis Pulling                                                                                                                                                                                           1.5s
 ⠼ db Pulling                                                                                                                                                                                              1.5s
 ⠼ proxy Pulling                                                                                                                                                                                           1.5s
 ⠿ frontend Error                                                                                                                                                                                          1.5s
 ⠿ backend Error                                                                                                                                                                                           1.5s
no matching manifest for linux/arm/v7 in the manifest list entries

I saw on Github that the arm64 architecture is available, so I suppose it should be only a tagging problem.

Container names are fixed and can not be changed

I'm managing my whole server with docker-compose, and as such the container names frontend, backend and proxy can be confusing/conflicting with the rest of my setup. I manually changed the compose file, but realized that those names are hard-coded into the images.

To me it would make a whole lot of sense to be able to run LibrePhotos with different container names, especially with environment variables like BACKEND_HOST already in the backend compose config that suggest that it would be configurable.

Access to original photos without authorization?

Maybe I am reading it wrong, but it seems that the proxy container openly shares original photos through the /data location:

location /data  {
        internal;
        alias /data/;      
    }
volumes:
      - ${myPhotos}:/data

Am I missing something or is the LibrePhotos login/password useless in protecting photos from external access?

Editing SECRET_KEY breaks login and scanning

I'm using the docker-compose install. In the .env file, I added the shhhhKey variable after using LibrePhotos for a while to initialize the SECRET_KEY environment variable when the backend gets created. I had the whole thing working before this, but adding that variable broke things; I can no longer login.

I also tried scanning using "python3 manage.py scan" which gives a BadSignature exception. Running scan from CLI without SECRET_KEY initialized gives an ImproperlyConfigured exception saying that SECRET_KEY must not be empty.

I'm assuming this variable is used to encrypt the database or something, as it works fine on a clean install. You should update install instructions and/or the docket image to make this more clear, since you cannot fix this afterwards.

Image could not be loaded

I follow the docs https://docs.librephotos.com/1/standard_install/ and created stacks.
I upload some photos to try, the LibrePhotos successfully identified the photos, and the face recognition works fine. I also can download the photos from the website. But I can't watch photos online. The Thumbnail and photos can't be loaded online.
image
image

Here are the logs from the container which named backend
`/usr/local/lib/python3.9/dist-packages/numpy/core/getlimits.py:499: UserWarning: The value of the smallest subnormal for <class 'numpy.float32'> type is zero.
setattr(self, word, getattr(machar, word).flat[0])
/usr/local/lib/python3.9/dist-packages/numpy/core/getlimits.py:89: UserWarning: The value of the smallest subnormal for <class 'numpy.float32'> type is zero.
return self._float_to_str(self.smallest_subnormal)
01:20:53 Worker rq:worker:559c0400956f425a929a901a10e22f5f: started, version 1.10.1
01:20:53 Subscribing to channel rq:pubsub:559c0400956f425a929a901a10e22f5f
01:20:53 *** Listening on default...
01:20:53 Cleaning registries for queue: default
01:20:53 default: api.apps.build_index() (0c8d3204-e856-48c0-835b-871deb7c6918)
127.0.0.1 - - [2022-07-28 01:20:53] "POST /build/ HTTP/1.1" 200 141 0.047056
01:20:53 default: Job OK (0c8d3204-e856-48c0-835b-871deb7c6918)
01:20:53 Result is kept for 60 seconds
01:20:53 default: api.apps.build_index() (a2d5d2f9-c1dd-4a2a-b5a6-825514df6250)
127.0.0.1 - - [2022-07-28 01:20:53] "POST /build/ HTTP/1.1" 200 141 0.025131
01:20:53 default: Job OK (a2d5d2f9-c1dd-4a2a-b5a6-825514df6250)
01:20:53 Result is kept for 60 seconds
01:20:53 default: api.apps.build_index() (b3c64d1d-300c-4549-b1f0-a86e7c4b0d4a)
127.0.0.1 - - [2022-07-28 01:20:53] "POST /build/ HTTP/1.1" 200 141 0.034289
01:20:53 default: Job OK (b3c64d1d-300c-4549-b1f0-a86e7c4b0d4a)
01:20:53 Result is kept for 60 seconds
Unauthorized: /api/searchtermexamples/
Unauthorized: /api/dirtree/
Unauthorized: /api/albums/date/list/
Not Found: /media/thumbnails_big/5
127.0.0.1 - - [2022-07-28 01:22:19] "POST /search/ HTTP/1.1" 200 171 0.003523
Bad Request: /api/nextcloud/listdir/
Not Found: /api/jobs/
Internal Server Error: /api/nextcloud/listdir/
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
File "/usr/local/lib/python3.9/dist-packages/urllib3/util/connection.py", line 95, in create_connection
raise err
File "/usr/local/lib/python3.9/dist-packages/urllib3/util/connection.py", line 85, in create_connection
sock.connect(sa)
File "/usr/local/lib/python3.9/dist-packages/gevent/_socketcommon.py", line 607, in connect
raise _SocketError(err, strerror(err))
OSError: [Errno 113] No route to host

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 386, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 1042, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.9/dist-packages/urllib3/connection.py", line 358, in connect
self.sock = conn = self._new_conn()
File "/usr/local/lib/python3.9/dist-packages/urllib3/connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f0ebe388520>: Failed to establish a new connection: [Errno 113] No route to host

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/requests/adapters.py", line 489, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.9/dist-packages/urllib3/connectionpool.py", line 787, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.9/dist-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='172.26.0.7', port=443): Max retries exceeded with url: /ocs/v1.php/cloud/capabilities (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f0ebe388520>: Failed to establish a new connection: [Errno 113] No route to host'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/usr/local/lib/python3.9/dist-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python3.9/dist-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/django/views/generic/base.py", line 70, in view
return self.dispatch(request, *args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/rest_framework/views.py", line 509, in dispatch
response = self.handle_exception(exc)
File "/usr/local/lib/python3.9/dist-packages/rest_framework/views.py", line 469, in handle_exception
self.raise_uncaught_exception(exc)
File "/usr/local/lib/python3.9/dist-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
raise exc
File "/usr/local/lib/python3.9/dist-packages/rest_framework/views.py", line 506, in dispatch
response = handler(request, *args, **kwargs)
File "/code/nextcloud/views.py", line 21, in get
nc.login(request.user.nextcloud_username, request.user.nextcloud_app_password)
File "/usr/local/lib/python3.9/dist-packages/owncloud/owncloud.py", line 362, in login
self._update_capabilities()
File "/usr/local/lib/python3.9/dist-packages/owncloud/owncloud.py", line 1930, in _update_capabilities
res = self._make_ocs_request(
File "/usr/local/lib/python3.9/dist-packages/owncloud/owncloud.py", line 1787, in _make_ocs_request
res = self._session.request(method, self.url + path, **attributes)
File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.9/dist-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/requests/adapters.py", line 565, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='172.26.0.7', port=443): Max retries exceeded with url: /ocs/v1.php/cloud/capabilities (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f0ebe388520>: Failed to establish a new connection: [Errno 113] No route to host'))
Unauthorized: /api/rqavailable/`

I don't know why.I think it's not permission issue because the AI is running and I can download the photos. And I try to set 777 to the folder but it doesn't work. I think the proxy or the redis may have something wrong?I need help beacuse I really need it to manage my photos.

Use multi stage docker build

Suggestion: Use multi stage docker build to only copy data model files instead of also including the whole tar file.
Multi stage build will also mean that only the dlib binaries are packaged; the dlib source and dlib object files won't be part of the build. Preliminary testing on my system shows an image reduction about ~1GB on the backend device. If any other deadweight from the build process can also be shed, it can make the image much leaner and easier to run on lower end devices.

I would submit a pull request but I'm not certain how the dlib binaries are installed/referred, so just a direct change to the dockerfile may cause regressions.

Video playback black/transparent in "Photos" tab

Hi

I'm having some problem opening videos in the main page (Photos with timestamp and Photos Recently Added)

The video preview (when you hover with the mouse over it) work correctly, but if you click on it the media start playing, audio is reproduced but there is no video
The carusel/player itself open correctly but it stay as a semi-transparent (gray/black) overlay
You can scroll back and forth on the video but no image is displayed

Tested with docker-compose installation with both releases week 11-12 and week 13, client side tested with various macos/chrome and Ubuntu/Firefox

If you play the same video from Albums Places page it work correctly

Thank you for this wonderful project,
Luca

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.