Baseten, where Truss was originally developed, is a platform for building full-stack applications powered by ML models. You can deploy a model on Baseten with or without a Truss, but creating a Truss allows you to develop and test your model locally first.
To deploy a Truss on Baseten, you first need:
Start by adding the Baseten Python client to your development environment:
pip install --upgrade baseten
If your model is already in memory (you created it with
create), you can skip loading it into memory from the directory.
Before deploying your Truss, you may need to load it into memory in a Jupyter notebook or similar Python environment:
my_truss = truss.load("my_truss_lives_here")
Once your Truss is in memory, simply run the following:
Head over to your Baseten account to see the model deployment logs and interface with your newly deployed model!
If your model uses secrets, set
deploy()command to enable your model to access secrets:
Unlike when Truss secrets are bound using environment variables, Baseten mounts secrets, so do not use the
TRUSS_SECRET_prefix when setting secret names.