Files
hass-addons/localai-p2p-worker/Dockerfile
alex cbf28e0b54
Some checks failed
Builder / Build addons (localai-p2p-master, amd64) (push) Failing after 9s
Builder / Build addons (localai-p2p-worker, amd64) (push) Failing after 8s
Validate / validate (push) Failing after 2s
Builder / Create release (push) Has been skipped
d
2025-05-30 15:32:23 +02:00

30 lines
869 B
Docker

FROM ghcr.io/hassio-addons/base:15.0.7
# Installer LocalAI
RUN apk add --no-cache \
curl \
bash \
&& curl -Lo /usr/local/bin/local-ai \
"https://github.com/mudler/LocalAI/releases/latest/download/local-ai-Linux-x86_64" \
&& chmod +x /usr/local/bin/local-ai
# Variables d'environnement pour LocalAI
ENV LOCALAI_P2P="true"
ENV LOCALAI_FEDERATED="true"
ENV LOCALAI_P2P_LISTEN_PORT="9090"
ENV LOCALAI_ADDRESS="0.0.0.0:8080"
ENV LOCALAI_CORS="true"
ENV LOCALAI_CORS_ALLOW_ORIGINS="*"
# Copier le script de démarrage pour s6-overlay
RUN mkdir -p /etc/services.d/localai
COPY run.sh /etc/services.d/localai/run
RUN chmod +x /etc/services.d/localai/run
# Créer un entrypoint qui utilise exec /init
RUN echo '#!/bin/bash' > /entrypoint.sh && \
echo 'exec /init' >> /entrypoint.sh && \
chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]