Serve a model from your own storage
Serve model weights from your own bucket, registry or volume instead of Hugging Face.
When you need it
- The weights stay in your cloud account.
- Serve private or fine-tuned models that are not on Hugging Face.
- No credentials in the application: the cluster's Model Serving add-on reads the storage with its own cloud identity, set up once per cluster.
How it works
- You grant the Model Serving add-on's identity read access to the storage, once per cluster.
- You deploy the model with a URI that points at the storage.
- AstroPulse downloads the weights with that identity and serves them.
Where your model can live
| Storage | URI format | Set up read access |
|---|---|---|
| Amazon S3 | s3://<bucket>/<path>/ | Let models read a private S3 bucket |
| Google Cloud Storage | gs://<bucket>/<path>/ | Let models read a private GCS bucket |
| Azure Blob | https://<account>.blob.core.windows.net/<container>/<path> | Let models read a private Blob container |
| OCI registry | oci://<registry>/<repo>@sha256:<digest> | None: the cluster's nodes pull it as they pull any image |
| A volume in the cluster | pvc://<claim>/<path> | None: the volume is mounted. The claim must be in the model's namespace, and you fill it yourself |
Before you start
- A cluster with Certificates and Model Serving installed, from the cluster's Add-ons tab. To call the model from outside the cluster, see what a model needs in Serve a model.
- Read access for the cluster, set up once with the link in the table above. In the console it is the Cloud access section of the Model Serving add-on.
- The model's files under one folder per version, for example
fraud/v12/. Never overwrite a version: a rollback then serves the same bytes.
In the console
-
Open Workloads > Models > Deploy model. Name the model and pick its cluster and profile.
-
On the Model step, under Model source, choose Object storage for S3, GCS or Azure Blob, Registry for an OCI image, or Volume for a claim.
Open zoom view -
In Location, paste the rest of the URI. On a cluster AstroPulse manages, Object storage shows the storage prefix of the cluster's cloud. The line below the field says how the cluster reads it, for example "Read as the cluster's … set on its Model Serving add-on."
-
Open Advanced and set Format:
vLLMfor a generative model's weights, or the predictive format, such asSKLearn. Every source except Hugging Face requires it.Open zoom view -
Select Check model. It checks that the location exists and that the cluster can read it, before anything is deployed.
-
Continue through Compute, Scaling and Access, then Review and Deploy, as in Serve a model.
For a volume, set the model's Namespace on the Options step to the claim's namespace.
You should see
The model on Workloads > Models reads Running, and its Serving card shows the Model URI you set.
Other ways in
- Nova: ask it in plain language, for example "serve the sklearn model at s3://acme-models/fraud/v12/ on prod-01".
- SDK and API: the Python SDK and the API reference use the same manifest.
With astroctl
name: "fraud-model"
profileName: "prod-inference"
source:
type: "Model"
model:
uri: "s3://acme-models/fraud/v12/"
format: "SKLearn"
astroctl app apply -f fraud-model.yaml --dry-run # checks, deploys nothing
astroctl app apply -f fraud-model.yaml
See the astroctl reference.
Settings
uriRequiredWhere the weights are. In the console, Model source and Location. Name the artifact only: no user, key or query string. To pin one object version, add ?versionId=<id> on s3:// or ?generation=<n> on gs://.
s3://, gs://, https://<account>.blob.core.windows.net/<container>/<path>, oci://<registry>/<repo>@sha256:<digest>, pvc://<claim>/<path>formatRequiredThe model format, which picks the serving runtime. In the console, Advanced > Format.
vLLMvLLM A generative model, such as a Hugging Face language model, served by vLLM with an OpenAI-compatible API.SKLearnscikit-learn A model saved by scikit-learn.XGBoostXGBoost A model saved by XGBoost.LightGBMLightGBM A model saved by LightGBM.TensorFlowTensorFlow A TensorFlow SavedModel.PyTorchPyTorch A PyTorch model packaged for TorchServe.ONNXONNX A model in the Open Neural Network Exchange format.TensorRTTensorRT A model compiled with NVIDIA TensorRT.TritonTriton A model repository for NVIDIA Triton Inference Server.MLflowMLflow A model saved in the MLflow model format.PMMLPMML A model in the Predictive Model Markup Language.PaddlePaddlePaddle A model saved by PaddlePaddle.
namespaceFor pvc:// only: the namespace that holds the claim. In the console, Options.
There is no credential field on a model. Read access is set on the cluster's Model Serving add-on.
If it's refused
identity or secretRef on the model.Next
- Sizing and scaling: put the model on a GPU and size it.
- Cut model download cost: why storage in the cluster's region is the cheap path.
- Model Serving add-on: every way a cluster can read private artifacts.