Docker: Update docker-compose.yml examples & READMEs for ARM64 and ARMv7

This commit is contained in:
Michael Mayer 2021-12-10 15:39:16 +01:00
parent 18e73ef5a0
commit 40145ca94b
4 changed files with 76 additions and 24 deletions

View file

@ -1,6 +1,6 @@
# Running PhotoPrism on a Raspberry Pi
# Running PhotoPrism on a Raspberry Pi 3 / 4 or other ARM64-based devices (64-bit)
Our stable version and development preview now come as a single multi-arch image for AMD64, ARM64, and ARMv7:
Our stable version and development preview now come as a single multi-arch image for AMD64 and ARM64:
https://hub.docker.com/r/photoprism/photoprism
@ -9,27 +9,28 @@ servers apply:
https://docs.photoprism.org/getting-started/docker-compose/
!!! Docker Image Name
Use `photoprism/photoprism:latest` for the stable release or `photoprism/photoprism:preview` for testing
preview builds. Make sure to explicitly pull the most recent image from Docker Hub. Existing users are advised to
update their `docker-compose.yml` config based on our examples for [ARM64](https://dl.photoprism.org/docker/arm64/docker-compose.yml)
and [ARMv7](https://dl.photoprism.org/docker/armv7/docker-compose.yml)-based devices.
Use `photoprism/photoprism:latest` for the stable release or `photoprism/photoprism:preview` for testing
preview builds. Make sure to explicitly pull the most recent image from Docker Hub. Existing users are advised to
update their `docker-compose.yml` config based on our example:
!!! ARMv7-based Devices (32-bit)
Owners of [ARMv7-based devices](https://dl.photoprism.org/docker/armv7/docker-compose.yml) have to revert to
an [alternative image](https://hub.docker.com/r/linuxserver/mariadb) if they want to use MariaDB.
The [official image](https://hub.docker.com/_/mariadb) is available for AMD64 and ARM64 only.
Pay close attention to changed directory and environment variable names.
https://dl.photoprism.org/docker/arm64/docker-compose.yml
To ensure compatibility with 64-bit Docker images, you have to boot your Pi with
the "arm_64bit=1" flag in its "config.txt":
https://www.raspberrypi.org/documentation/installation/installing-images/README.md
An "exec format error" will occur otherwise.
Alternatively, you can install UbuntuDockerPi - it's a 64-bit Ubuntu with Docker pre-configured:
https://github.com/guysoft/UbuntuDockerPi
### System Requirements ###
- Your device should have at least 4 GB of memory. Running PhotoPrism on a server with less than 4 GB of swap space
or setting a memory/swap limit can cause unexpected restarts, especially when the indexer temporarily needs more
memory to process large files.
- It's important to [boot](https://www.raspberrypi.org/documentation/installation/installing-images/README.md) your
Raspberry Pi 3 / 4 with the parameter `arm_64bit=1` in `config.txt` to use our ARM64 (64-bit) image.
An "exec format error" will occur otherwise. Alternatively, you may run it on
[UbuntuDockerPi](https://github.com/guysoft/UbuntuDockerPi). It's a 64bit Ubuntu Server with Docker pre-installed.
- If you see Docker errors related to "cgroups", it may help to add the following to `/boot/firmware/cmdline.txt`:
```
cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1

View file

@ -43,9 +43,8 @@ version: '3.5'
services:
## App Server (required)
photoprism:
## photoprism/photoprism-arm64 has been replaced by a single multi-arch image for AMD64,
## ARM64, and ARMv7. Use photoprism/photoprism:preview for testing preview builds or
## photoprism/photoprism:latest for the stable release:
## photoprism/photoprism-arm64 has been replaced by a single multi-arch image for AMD64 and ARM64 (64-bit).
## Use photoprism/photoprism:preview for testing preview builds or :latest for the stable release:
image: photoprism/photoprism:latest
depends_on:
- mariadb

View file

@ -0,0 +1,54 @@
# Running PhotoPrism on an older Raspberry Pi or other ARMv7-based devices (32-bit)
If your device meets the system requirements, mostly the same installation instructions as for regular Linux
servers apply:
https://docs.photoprism.org/getting-started/docker-compose/
Use `photoprism/photoprism:armv7` for the stable release or `photoprism/photoprism:armv7-preview` for testing
preview builds. Make sure to explicitly pull the most recent image from Docker Hub. Existing users are advised to
update their `docker-compose.yml` config based on our example:
https://dl.photoprism.org/docker/armv7/docker-compose.yml
You also have to revert to an alternative image if they want to use MariaDB, for example:
https://hub.docker.com/r/linuxserver/mariadb
The [official image](https://hub.docker.com/_/mariadb) is available for AMD64 and ARM64 only.
Pay close attention to changed directory and environment variable names.
### System Requirements ###
- Your device should have at least 4 GB of memory. Running PhotoPrism on a server with less than 4 GB of swap space
or setting a memory/swap limit can cause unexpected restarts, especially when the indexer temporarily needs more
memory to process large files.
- If you see Docker errors related to "cgroups", it may help to add the following to `/boot/firmware/cmdline.txt`:
```
cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1
```
- We recommend disabling Linux kernel security in your `docker-compose.yml`, especially if you do not have experience
with the configuration:
```yaml
photoprism:
security_opt:
- seccomp:unconfined
- apparmor:unconfined
```
- If you install PhotoPrism on a public server outside your home network, please always run it behind a secure
HTTPS reverse proxy such as Traefik, Caddy, or NGINX. Your files and passwords will otherwise be transmitted in
clear text and can be intercepted by anyone, including your provider, hackers, and governments.
!!! Note
Indexing large photo and video collections significantly benefits from fast, local SSD storage,
and plenty of memory for caching. Especially the conversion of RAW images and the transcoding of
videos are very demanding.
!!! Reducing System Load
If you're running out of memory - or other system resources - while indexing, try reducing the
[number of workers](https://docs.photoprism.org/getting-started/config-options/) by setting
`PHOTOPRISM_WORKERS` to a reasonably small value in `docker-compose.yml` (depending on the performance of the server).
As a measure of last resort, you may disable using TensorFlow for image classification and facial recognition.
Big thank you to [Guy Sheffer](https://github.com/guysoft)
for [building](https://github.com/photoprism/photoprism/issues/109) this!

View file

@ -1,6 +1,6 @@
version: '3.5'
# Example Docker Compose config file for PhotoPrism (ARMv7-based devices)
# Example Docker Compose config file for PhotoPrism (ARMv7-based, 32-bit devices)
#
# Note:
# - Use https://dl.photoprism.org/docker/arm64/docker-compose.yml for running PhotoPrism on ARM64-based (64-bit) devices.
@ -41,10 +41,8 @@ version: '3.5'
services:
## App Server (required)
photoprism:
## photoprism/photoprism-arm64 has been replaced by a single multi-arch image for AMD64,
## ARM64, and ARMv7. Use photoprism/photoprism:preview for testing preview builds or
## photoprism/photoprism:latest for the stable release:
image: photoprism/photoprism:latest
## Use photoprism/photoprism:armv7-preview for testing preview builds or :armv7 for the stable release:
image: photoprism/photoprism:armv7
depends_on:
- mariadb
## Only enable automatic restarts once your installation is properly