Spaces:
Runtime error
Runtime error
File size: 1,618 Bytes
f8982de 57ddc9e ba3abd4 64ff49b 475b3d3 241266f 475b3d3 241266f 4a92b32 5adad05 4a92b32 475b3d3 4a92b32 475b3d3 4a92b32 475b3d3 4a92b32 475b3d3 4a92b32 475b3d3 64ff49b 4a92b32 d5fd8c1 516d7bd 3ae60c5 9d6bd16 3ae60c5 64ff49b 4a71a14 edaa402 3ae60c5 d5fd8c1 e00d2e2 4a92b32 5adad05 4a92b32 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | FROM nousresearch/hermes-agent:latest
USER root
# 1. Dépendances minimales
RUN apt-get update && \
apt-get install -y nodejs npm ffmpeg bash && \
rm -rf /var/lib/apt/lists/*
# 2. Création des dossiers et permissions complètes pour l'utilisateur 1000 (Hugging Face)
RUN mkdir -p /opt/data/logs /opt/data/.hermes && \
chown -R 1000:1000 /opt/data && \
chmod -R 777 /opt/data
# 3. Lancement direct du binaire Hermes (Bypass total de s6-overlay et execline)
RUN cat << 'EOF' > /opt/start.sh
#!/bin/bash
set -e
# Export des chemins système
export PATH="/command:/package/admin/s6-overlay/bin:/opt/hermes/bin:/usr/local/bin:${PATH}"
echo "🚀 Démarrage d'Hermes Agent (Mode Direct Native pour Hugging Face)..."
# Détection et exécution directe de la CLI Hermes avec les arguments (gateway)
if command -v hermes >/dev/null 2>&1; then
exec hermes "$@"
elif [ -f /opt/hermes/bin/hermes ]; then
exec /opt/hermes/bin/hermes "$@"
else
exec python3 -m hermes "$@"
fi
EOF
RUN chmod +x /opt/start.sh
# 4. Variables d'environnement Hermes
ENV HERMES_HOME=/opt/data \
HOME=/opt/data \
API_SERVER_ENABLED=true \
API_SERVER_HOST=0.0.0.0 \
API_SERVER_PORT=8642 \
HERMES_DASHBOARD=1 \
HERMES_DASHBOARD_HOST=0.0.0.0 \
HERMES_DASHBOARD_PORT=7860 \
API_SERVER_KEY=hermes_2026_8QvL9mN2XpR7kTw5YcH4ZaU1EfD8JsP6BgW3NrKyLxV9 \
TELEGRAM_ENABLED=false
EXPOSE 7860 8642
WORKDIR /opt/data
# 5. Passage obligatoire à l'utilisateur 1000 pour Hugging Face Spaces
USER 1000
# 6. Point d'entrée sécurisé et commande gateway
ENTRYPOINT ["/opt/start.sh"]
CMD ["gateway"] |