Deploy tidymodel model to GCP using Docker and Vetiver

  Kiến thức lập trình

I’m trying to follow along to this Julia Silge MLOps video where she uses Vetiver and Tidymodels to deploy to AWS Sagemaker however after running up hundreds of dollars of bills on AWS 🙁 I’ve moved to GCP because they offer $300 of free credit.

I’m at the stage of trying to create the docker image to push to GCP however when I run:

docker run --env-file C:/Users/John/Documents/.Renviron --rm -p 8000:8000 penguins

I get the following error:

enter image description here

I’m slightly confused because I’ve set the .Renviron to include the service account json file as per below:

enter image description here

Based on the reply from VonC I’ve added the /path/in/container as ‘/documents/’

enter image description here

In the screenshot below I can see that this path/in/container has been pushed to the image:

enter image description here

As I can run gcs_list_buckets(projectId = "my-project-id") and see the buckets I’ve created so it looks as though I’m fully connected to my cloud environment.

Having researched this for a number of days it appears that I have to supply a full path to my environment variables to enable authentication, am I missing something?

LEAVE A COMMENT