This message was deleted.
# announcements
s
This message was deleted.
b
Hi @Dawid Smoleń To deploy to AWS sagemaker, you would have to configure your AWS cred on the Azure machine. BentoML uses
boto3
under the hood for AWS operations. The order of how
boto3
gets credentials, is first look at the environment var
AWS_ACCESS_KEY_ID
and
AWS_SECRET_ACCESS_KEY
, if no envvars are set, it will look into
./aws/credentials
and then
./aws/config
. You can find relevant documentations at https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html#guide-configuration just reply here or
@
me, if you have any questions
d
Thanks! I see, I had problem with ~/.aws/ dir because everything is happening on CI machine on Azure DevOps. Then I figured out I can set the variables you mentioned, although I don't have it set fully automatically I hope I'll be able to do that. Thanks for your help!
👍 1
b
Let me know how it goes
d
actually I am wondering how can I update or delete sagemaker deployment, when it was created on Azure CI machine, that I'm not sure I have access to. Updating deployment requires
--bento-service-bundle
but as far as I understand after new commit we are creating a new fresh instance and I have no information about
name:version
created by the previous pipeline, am I right?
Look like I will have to upload this information (model name and version) somewhere to s3 to know what to update in next CI run...
b
@Dawid Smoleń Typically, when deploy a model from local machine, you just need
bentoml sagemaker update same_deployment_name --options
and
bentoml sagemaker delete same_deployment_name
for update and delete operations. BentoML's backend service, Yatai, uses a local
sqlite
db as default for managing models and deployments. Yatai service could also take remote sqlite file (from s3) or postgres db as its storage backend. There is a CLI command to start a local Yatai services,
bentoml yatai-service-start
that can takes
db-url
and
repo-base-url
(where the model will be stored, default is local file system) as options. For your use case with Azure CI, I think a good option for now is have a remote postgres or sqlite db. I would first start an Yatai service with
bentoml yatai-service-start --db-url=MY_REMOTE_DB_URL
, and then either run
bentoml config set yatai_service.url=YATAI_SERVICE_ADDRESS
(for local, it is 127.0.0.1:50051) . When you set yatai_service_url, all BentoML operations afterward, will use this Yatai service. Since you have the remote db setup, all of the model and deployment operations will be stored for future use. You can also assign
repo-base-url
to a s3 bucket, so all of the model version will be also stored as well. We are working on have good documentation for this, for now, you can checkout our test for reference. For using postgres db(https://github.com/bentoml/BentoML/blob/3d4f7b9db101af1feaac7051127ce8cce4931b1d/e2e_tests/yatai_server/test_postgres_local_fs.py#L16) We are actively working on make this process much smoother and easier. We will soon dockerlize the yatai service and you can deploy it as a service for your CI operations. When you run your CI, you just need to pass yatai service url as an envvar, without doing the work I mentioned above. Let me know if this help you move forward or not.
@Dawid Smoleń also an even easier way right now is you can just update the the db url in the bentoml configuration file, instead of start a new yatai service. Here is how you do it,
bentoml config set db.url=REMOTE_DB_URL