# Deploy this into an EXISTING Docker-SDK Space you already own # (e.g. SimpleChatbot, ultichat, Datasourceforcryptocurrency-4) — creating a # brand-new free Docker Space currently requires a paid HF plan, but Spaces # you already have are grandfathered onto the free tier. FROM diegosouzapw/omniroute:latest USER root # Install python3 + huggingface_hub for the state-sync script. Base image # distro isn't guaranteed — try Debian/Ubuntu's apt first, fall back to # Alpine's apk. If BOTH fail, check what `cat /etc/os-release` reports in # the image and adjust this line accordingly. RUN (apt-get update && apt-get install -y --no-install-recommends python3 python3-pip && rm -rf /var/lib/apt/lists/*) \ || (apk add --no-cache python3 py3-pip) RUN pip3 install --no-cache-dir --break-system-packages huggingface_hub COPY sync-entrypoint.sh /app/sync-entrypoint.sh RUN chmod +x /app/sync-entrypoint.sh && chown -R node:node /app/sync-entrypoint.sh /app/data 2>/dev/null || true USER node # HF Spaces only route traffic to port 7860, regardless of SDK. ENV PORT=7860 EXPOSE 7860 # The base image's ENTRYPOINT is /app/check-permissions.sh, which execs # whatever CMD is given to it — so this CMD override still goes through # the image's own permission setup, it just replaces the final command. CMD ["/app/sync-entrypoint.sh"]