set up immich to work with nvidia gpu
This commit is contained in:
parent
4c54a80122
commit
fcd36a1035
5 changed files with 130 additions and 34 deletions
|
|
@ -0,0 +1,36 @@
|
|||
# vim: ft=systemd
|
||||
[Unit]
|
||||
Description=Immich machine learning container
|
||||
After=network.target
|
||||
|
||||
[Container]
|
||||
Environment=IMMICH_VERSION={{ immich_version }}
|
||||
{% if immich_hw_accel == 'nvidia' %}
|
||||
Image=ghcr.io/immich-app/immich-machine-learning:{{ immich_version }}-cuda
|
||||
{% elif immich_hw_accel == 'intel' %}
|
||||
Image=ghcr.io/immich-app/immich-machine-learning:{{ immich_version }}-openvino
|
||||
{% else %}
|
||||
Image=ghcr.io/immich-app/immich-machine-learning:{{ immich_version }}
|
||||
{% endif %}
|
||||
|
||||
Volume={{ immich_model_cache_dir }}:/cache
|
||||
|
||||
{% if immich_hw_accel == 'nvidia' %}
|
||||
# Nvidia GPU access via CDI - requires nvidia-container-toolkit with CDI configured:
|
||||
# nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml
|
||||
AddDevice=nvidia.com/gpu=all
|
||||
{% elif immich_hw_accel == 'intel' %}
|
||||
# Intel GPU and OpenVINO device access
|
||||
AddDevice=/dev/dri
|
||||
Volume=/dev/bus/usb:/dev/bus/usb
|
||||
{% endif %}
|
||||
|
||||
PublishPort=0.0.0.0:8028:3003
|
||||
|
||||
User=0
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
Loading…
Add table
Add a link
Reference in a new issue