Skip to content

Docker: Set explicit HOME env for Darktable & RawTherapee #1525

@michalskalski

Description

@michalskalski

Hi,

I see in logs for all my raw files:

time="2021-09-13T08:27:31Z" level=warning msg="index: failed converting 20141221-poz066.DNG to jpeg (path lookup '/.config/darktable' fails with: 'No such file or directory'\n)"

I run photoprism using below docker compose:

  photoprism:
    image: photoprism/photoprism:preview
    container_name: photoprism
    security_opt:
      - seccomp:unconfined
      - apparmor:unconfined
    networks:
      multimedia:
        ipv4_address: 192.168.143.16
    environment:
      PHOTOPRISM_ADMIN_PASSWORD: "removed"          # PLEASE CHANGE: Your initial admin password (min 4 characters)
      PHOTOPRISM_ORIGINALS_LIMIT: 5000               # File size limit for originals in MB (increase for high-res video)
      PHOTOPRISM_HTTP_COMPRESSION: "gzip"            # Improves transfer speed and bandwidth utilization (none or gzip)
      PHOTOPRISM_DEBUG: "false"                      # Run in debug mode (shows additional log messages)
      PHOTOPRISM_PUBLIC: "false"                     # No authentication required (disables password protection)
      PHOTOPRISM_READONLY: "true"                   # Don't modify originals directory (reduced functionality)
      PHOTOPRISM_EXPERIMENTAL: "false"               # Enables experimental features
      PHOTOPRISM_DISABLE_WEBDAV: "false"             # Disables built-in WebDAV server
      PHOTOPRISM_DISABLE_SETTINGS: "false"           # Disables Settings in Web UI
      PHOTOPRISM_DISABLE_TENSORFLOW: "false"         # Disables using TensorFlow for image classification
      PHOTOPRISM_DARKTABLE_PRESETS: "false"          # Enables Darktable presets and disables concurrent RAW conversion
      PHOTOPRISM_DETECT_NSFW: "false"                # Flag photos as private that MAY be offensive (requires TensorFlow)
      PHOTOPRISM_UPLOAD_NSFW: "true"                 # Allow uploads that MAY be offensive
      # PHOTOPRISM_DATABASE_DRIVER: "sqlite"         # SQLite is an embedded database that doesn't require a server
      PHOTOPRISM_DATABASE_DRIVER: "mysql"            # Use MariaDB (or MySQL) instead of SQLite for improved performance
      PHOTOPRISM_DATABASE_SERVER: "mariadb:3306"     # MariaDB database server (hostname:port)
      PHOTOPRISM_DATABASE_NAME: "photoprism"         # MariaDB database schema name
      PHOTOPRISM_DATABASE_USER: "photoprism"         # MariaDB database user name
      PHOTOPRISM_DATABASE_PASSWORD: "removed"       # MariaDB database user password
      PHOTOPRISM_SITE_URL: "removed"  # Public PhotoPrism URL
      PHOTOPRISM_SITE_TITLE: "PhotoPrism"
      PHOTOPRISM_SITE_CAPTION: "Browse Your Life"
      PHOTOPRISM_SITE_DESCRIPTION: ""
      PHOTOPRISM_SITE_AUTHOR: ""
      PHOTOPRISM_JPEG_QUALITY: "95"
    user: "489:499"
    volumes:
      - "/data/photos:/photoprism/originals"
      - "/photoprism/storage:/photoprism/storage"

Both dartable-cli and rawtherapee-cli return errors in interactive mode:

$ docker-compose exec photoprism bash
groups: cannot find name for group ID 499
I have no name!@3f570ab729bc:/photoprism$ darktable-cli
path lookup '/.config/darktable' fails with: 'No such file or directory'

I have no name!@3f570ab729bc:/photoprism$ rawtherapee-cli

FATAL ERROR:
Creation of the user's processing profile directory "/.config/RawTherapee/profiles" failed!

I checked that HOME dir was set to '/' this is where above commands tries to create files, but '/' belongs to root so it can't create it there:

I have no name!@3f570ab729bc:/photoprism$ env | grep HOME
HOME=/

I changed HOME variable to point to '/photoprism' dir which allow me to use both commands:

I have no name!@3f570ab729bc:/photoprism$ export HOME=/photoprism
I have no name!@3f570ab729bc:~$ rawtherapee-cli
RawTherapee, version 5.8, command line.
Terminating without anything to do.
I have no name!@3f570ab729bc:~$ rawtherapee-cli ^C
I have no name!@3f570ab729bc:~$ darktable-c

I have no name!@3f570ab729bc:~$ darktable-cli
usage: darktable-cli [<input file or dir>] [<xmp file>] <output destination> [options] [--core <darktable options>]

options:
   --width <max width> default: 0 = full resolution
   --height <max height> default: 0 = full resolution
   --bpp <bpp>, unsupported
   --hq <0|1|false|true> default: true
   --upscale <0|1|false|true>, default: false
   --export_masks <0|1|false|true>, default: false
   --style <style name>
   --style-overwrite
   --apply-custom-presets <0|1|false|true>, default: true
                          disable for multiple instances
   --out-ext <extension>, default from output destination or '.jpg'
                          if specified, takes preference over output
   --import <file or dir> specify input file or dir, can be used'
                          multiple times instead of input file
   --icc-type <type> specify icc type, default to NONE
                     use --help icc-type for list of supported types
   --icc-file <file> specify icc filename, default to NONE
   --icc-intent <intent> specify icc intent, default to LAST
                     use --help icc-intent for list of supported intents
   --verbose
   --help,-h [option]
   --version

On the end I extended my docker compose file with HOME: "/photoprism" in env section and conversion is working now.
Maybe it is worth to extend sample docker compose file with above information?

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingreleasedAvailable in the stable release

Type

No type

Projects

Status

Release 🌈

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions