immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
39.7k stars 1.9k forks source link

[BUG] Immich Machine Learning keeps restarting. #1848

Closed AvMavs closed 1 year ago

AvMavs commented 1 year ago

The bug

The Immich Machine Learning container keeps restarting.

The OS that Immich Server is running on

Ubuntu 22.04.2 LTS x86_64

Version of Immich Server

v1.48.1

Version of Immich Mobile App

v1.48.1

Platform with the issue

Your docker-compose.yml content

---
version: "3.9"

services:
  immich-server:
    image: altran1502/immich-server:release
    entrypoint: ["/bin/sh", "./start-server.sh"]
    volumes:
      - ${STORDIR}/vault/immich/upload:/usr/src/app/upload
    env_file:
      - .env
    environment:
      - NODE_ENV=production
    depends_on:
      - immich-redis
      - immich-database
    restart: always

  immich-microservices:
    image: altran1502/immich-server:release
    entrypoint: ["/bin/sh", "./start-microservices.sh"]
    volumes:
      - ${STORDIR}/vault/immich/upload:/usr/src/app/upload
    env_file:
      - .env
    environment:
      - NODE_ENV=production
    depends_on:
      - immich-redis
      - immich-database
    restart: always

  immich-machine-learning:
    image: altran1502/immich-machine-learning:release
    entrypoint: ["/bin/sh", "./entrypoint.sh"]
    volumes:
      - ${STORDIR}/vault/immich/upload:/usr/src/app/upload
    env_file:
      - .env
    environment:
      - NODE_ENV=production
    depends_on:
      - immich-database
    restart: always

  immich-web:
    image: altran1502/immich-web:release
    entrypoint: ["/bin/sh", "./entrypoint.sh"]
    env_file:
      - .env
    restart: always

  immich-redis:
    container_name: immich_redis
    image: redis:6.2
    restart: always

  immich-database:
    container_name: immich_postgres
    image: postgres:14
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      PG_DATA: /var/lib/postgresql/data
    volumes:
      - ${STORDIR}/vault/immich/pgdata:/var/lib/postgresql/data
    restart: always

  immich-proxy:
    container_name: immich_proxy
    image: altran1502/immich-proxy:release
    ports:
      - 2283:8080
    logging:
      driver: none
    depends_on:
      - immich-server
    restart: always

Your .env content

# STORAGE

STORDIR=(Redacted)

###################################################################################
# Database
###################################################################################

DB_HOSTNAME=(Redacted)
DB_USERNAME=(Redacted)
DB_PASSWORD=(Redacted)
DB_DATABASE_NAME=(Redacted)

# Optional Database settings:
# DB_PORT=5432

###################################################################################
# Redis
###################################################################################

REDIS_HOSTNAME=immich_redis

# Optional Redis settings:
# REDIS_PORT=6379
# REDIS_DBINDEX=0
# REDIS_PASSWORD=(Redacted)
# REDIS_SOCKET=

###################################################################################
# Upload File Config
###################################################################################

UPLOAD_LOCATION=absolute_location_on_your_machine_where_you_want_to_store_the_backup

###################################################################################
# Log message level - [simple|verbose]
###################################################################################

LOG_LEVEL=simple

###################################################################################
# JWT SECRET
###################################################################################

JWT_SECRET=(Redacted)

###################################################################################
# Reverse Geocoding
####################################################################################

# DISABLE_REVERSE_GEOCODING=false

# Reverse geocoding is done locally which has a small impact on memory usage
# This memory usage can be altered by changing the REVERSE_GEOCODING_PRECISION variable
# This ranges from 0-3 with 3 being the most precise
# 3 - Cities > 500 population: ~200MB RAM
# 2 - Cities > 1000 population: ~150MB RAM
# 1 - Cities > 5000 population: ~80MB RAM
# 0 - Cities > 15000 population: ~40MB RAM

# REVERSE_GEOCODING_PRECISION=3

####################################################################################
# WEB - Optional
####################################################################################

# Custom message on the login page, should be written in HTML form.
# For example PUBLIC_LOGIN_PAGE_MESSAGE="This is a demo instance of Immich.<br><br>Email: <i>demo@demo.de</i><br>Password: <i>demo</i>"

PUBLIC_LOGIN_PAGE_MESSAGE="Have a nice day!"

Reproduction steps

1. Update the working Docker Container.

Additional information

Error Log in Docker: 02/23/2023 11:27:07 PM: /bin/sh: 0: cannot open ./entrypoint.sh: No such file

bo0tzz commented 1 year ago

As detailed in the release notes for 1.48.0, you need to update your docker-compose.yml.

AvMavs commented 1 year ago

Oh, sorry, thanks!

easez88 commented 1 year ago

I'm also having this issue and can confirm that I am using the latest docker-compose.yml.

alextran1502 commented 1 year ago

I'm also having this issue and can confirm that I am using the latest docker-compose.yml.

@easez88 You probably have a stale container. Please perform

  1. docker-compose pull to get new images
  2. docker-compose down to bring down all the Immich containers
  3. docker-container prune to remove all the containers
  4. docker-compose up to recreate all the containers
alextran1502 commented 1 year ago

@easez88 wrong thread?

easez88 commented 1 year ago

@easez88 wrong thread?

Yeah, This fixed it for me. Sorry