4
This commit is contained in:
@@ -1,26 +1,24 @@
|
||||
FROM localai/localai:latest-cpu
|
||||
|
||||
ARG BUILD_FROM
|
||||
FROM $BUILD_FROM
|
||||
|
||||
# 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="*"
|
||||
|
||||
# Installer bashio pour accéder à la configuration Home Assistant
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
curl jq && \
|
||||
curl -J -L -o /tmp/bashio.tar.gz \
|
||||
"https://github.com/hassio-addons/bashio/archive/v0.16.2.tar.gz" && \
|
||||
mkdir /tmp/bashio && \
|
||||
tar zxvf /tmp/bashio.tar.gz --strip 1 -C /tmp/bashio && \
|
||||
mv /tmp/bashio/lib /usr/lib/bashio && \
|
||||
ln -s /usr/lib/bashio/bashio /usr/bin/bashio && \
|
||||
rm -rf /tmp/bashio* && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
# Copier le script de démarrage
|
||||
COPY run.sh /usr/bin/run.sh
|
||||
RUN chmod +x /usr/bin/run.sh
|
||||
|
||||
COPY run.sh /build/custom-entrypoint.sh
|
||||
RUN chmod +x /build/custom-entrypoint.sh
|
||||
|
||||
# Remplacer l'entrypoint par défaut
|
||||
ENTRYPOINT ["/build/custom-entrypoint.sh"]
|
||||
CMD ["/usr/bin/run.sh"]
|
||||
|
||||
Reference in New Issue
Block a user