Files
hass-addons/localai-p2p-master/run.sh
Alexi C 367b814058
Some checks failed
Builder / Build addons (localai-p2p-master, amd64) (push) Failing after 1m49s
Builder / Build addons (localai-p2p-worker, amd64) (push) Failing after 9s
Validate / validate (push) Failing after 2s
Builder / Create release (push) Has been skipped
Initial commit: LocalAI P2P addons
2025-05-30 11:20:00 +02:00

12 lines
317 B
Bash

#!/usr/bin/with-contenv bashio
CONFIG_PATH=/data/options.json
GPU_LAYERS="$(bashio::config 'gpu_layers')"
TOKEN="$(bashio::config 'master_token' || echo '')"
if [ ! -z "$TOKEN" ]; then
export LOCALAI_P2P_TOKEN="$TOKEN"
fi
exec /build/local-ai run --models-path=/share/localai/models --gpu-layers="$GPU_LAYERS"