sincecutoff.com
← all changes

hf endpoints deploy accepts custom container settings

Introduced 2026-06-18 · score 0.98

HOW TO USE IT

When deploying a repository model in a custom Docker image, run `hf endpoints deploy` with `--framework custom` and `--custom-image`, then add the documented container, environment, and access settings you need.

hf endpoints deploy <endpoint-name> --repo <owner/repo> --framework custom --accelerator <cpu|gpu|neuron> --vendor <vendor> --region <region> --instance-type <instance-type> --instance-size <size> --custom-image <image-url> --health-route <route> --port <port> --container-args "<launch arguments>" --env <KEY=value> --type authenticated

WHY THIS HELPS

Deploy a custom container for a repository model from a coding workflow.

BEFORE THIS CHANGE

Hand-write JSON and POST the raw endpoints API to deploy a custom container.

REQUIREMENTS AND LIMITATIONS

  • Version: v1.20.0
  • NAME (required): Endpoint name.
  • --repo (required): Model repository associated with the endpoint.
  • --framework (required): Model framework; use `custom` for a custom container.
  • --accelerator, --vendor, --region, --instance-type, --instance-size (required): Specify endpoint hardware and cloud placement; run `hf endpoints hardware` for valid combinations.
  • --custom-image: Docker image URL; required when using `--health-route` or `--port`. The custom-container guide uses it with `--framework custom`.
  • --health-route: Health check route exposed by the container; requires `--custom-image`.
  • --port: Port the container listens on; requires `--custom-image`.
  • --container-args: Quoted launch string passed as container arguments.
  • --container-command: Quoted launch string overriding the container entrypoint. The v1.20.0 guide names this option; it does not document `--command`.
  • --env: Inject environment variables; the documented form is `KEY=value`.
  • --secrets: Inject secrets into the container environment.
  • --type: Endpoint access type: `public`, `authenticated`, or `private`; defaults to `authenticated`.
  • container_command: SDK `create_inference_endpoint` parameter: list of tokens overriding the container entrypoint command.
  • container_args: SDK `create_inference_endpoint` parameter: list of tokens appended to the container entrypoint.
  • Prerequisite: Install the `hf` CLI and authenticate to Hugging Face to use the Hub.
  • Prerequisite: The model repository is mounted at `/repository` inside the container.
  • The model repository is mounted at `/repository` inside the container.
  • The custom-container flags require `--custom-image`.
  • Passing `protected` for `--type` emits a `FutureWarning`.
  • Docs conflict: The supplied release note names `--command`; the v1.20.0 official CLI guide documents `--container-command` instead.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card