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:
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:
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:
flexai training run
- Starts a new Training Job.flexai inference serve
- Creates an Inference Endpoint.flexai storage create
- Creates a new Remote Storage Provider Connection.
Available subcommands
Section titled “Available subcommands”flexai secret create
- Creates and stores a new secret in the FlexAI secret store.flexai secret delete
- Deletes an existing secret from the FlexAI secret store.flexai secret list
- Lists all the secrets that have been created.