Pass settings to your model or container, such as a file path or a framework option, as environment variables that the endpoint starts with.
Add the variables
Section titled “Add the variables”- On the create form, or on Update Inference, open Advanced Settings.
- Under Environment Variables, select Add Environment Variable.
- Type the Key and the Value. A key can use letters, digits, and underscores, and must start with a letter or an underscore. Every row needs both a key and a value.
- Repeat for each variable.
- Select Deploy Endpoint, or Update Endpoint on an existing endpoint.
If you add the same key twice, the endpoint uses the value you added last. TIR drops rows with an empty key before it creates the endpoint.
The variable TIR adds
Section titled “The variable TIR adds”TIR adds HF_HOME for you. You can change its value; its name stays fixed. It starts as the cache path plus /.cache, so the Hugging Face cache sits inside Model Cache Storage.
Check the variables
Section titled “Check the variables”Under Actions, select Update Inference to see your variables and change them. See Update an endpoint.
If a framework or container needs a Hugging Face or GitHub token, you add it as an integration. The integration takes the place of a variable. See Create an endpoint.
Was this page helpful?