# Hugging Face Docker Space for Draw Things gRPC server (CUDA) # Uses the official prebuilt image; adds Envoy bridge for HF ($PORT) → gRPC (h2) FROM drawthingsai/draw-things-grpc-server-cli:latest USER root RUN apt-get update && \ apt-get install -y --no-install-recommends \ ca-certificates curl wget git jq unzip xz-utils tar \ netcat-openbsd \ && rm -rf /var/lib/apt/lists/* # --- Install Envoy (static binary) --- # (pevná verze; můžeš později změnit tag) RUN curl -L -o /usr/local/bin/envoy \ https://github.com/envoyproxy/envoy/releases/download/v1.31.0/envoy-1.31.0-linux-x86_64 && \ chmod +x /usr/local/bin/envoy # Workdir & models dir WORKDIR /srv ENV MODELS_DIR=/grpc-models RUN mkdir -p ${MODELS_DIR} # Copy entrypoint + helpery + envoy config COPY start.sh /srv/start.sh COPY model_download.sh /srv/model_download.sh COPY envoy.yaml /srv/envoy.yaml RUN chmod +x /srv/*.sh # --- Runtime env knobs --- # Comma or newline separated list of model URLs to fetch on startup (optional) ENV MODEL_URLS="" # gRPCServerCLI port (interní) ENV GRPC_PORT=7859 # HF injektuje $PORT; Envoy ho přečte přes start.sh a přepíše listener port EXPOSE 7860 7859 CMD ["/srv/start.sh"]