Skip to content

Command: secret

The flexai secret command allows for the management of Secrets using the FlexAI Secret Store.

Secrets are encrypted at rest and are only made available to Training Jobs at runtime as an environment variable.

Any number of Secrets can be passed on to a Training Job using the -S/--secret flag:

Terminal window
flexai training run test-training-123 \
--dataset open_web \
--repository-url https://github.com/flexaihq/nanoGPT/ \
--secret HF_TOKEN=hf-token-dev \
--secret WANDB_API_KEY=wandb-key \
-- train.py ...

The same way Secrets can be passed to when creating an Inference Endpoint using the --hf-token-secret or --api-key-secret flags:

Terminal window
flexai inference serve llm-text-inference-prod \
--hf-token-secret hf-token-prod \
--api-key-secret api-key-prod \
-- --model=mistralai/Mistral-7B-Instruct-v0.1 ...

Commands that leverage the FlexAI Secret Store include: