rstudio / vetiver-python

Version, share, deploy, and monitor models.
https://rstudio.github.io/vetiver-python/stable/
MIT License
59 stars 17 forks source link

GCS: gcsf not included in Dockerfile #165

Closed ghost closed 1 year ago

ghost commented 1 year ago

Describe the bug When I prepare a Dockerfile with vetiver.prepare_docker for a Board in a google cloud storage bucket the package the vetiver_requirements.txt is missing the package gcsfs. Therefore the Run step is not successfull. Adding gcsfs manualy in the vetiver_requirements.txt resolves it.

To Reproduce

Prepare Script:

import vetiver import pins

board = pins.board_gcs('deployed_model', allow_pickle_read=True) vetiver.prepare_docker(board, "deployed_model_test", path="cloud_run/rest_api/app")

In console: sudo docker build -t model. sudo docker run model

Expected behavior Include gcsfs in vetiver_requirements.txt after running vetiver.prepare_docker(board, "nk_churn_test", path="cloud_run/rest_api/app")

Screenshots image

Desktop:

isabelizimm commented 1 year ago

Hi there @MartinBaumga, thank you so much for this report!

It looks like this is happening since vetiver is unaware of the backend pins is connecting to, so it is not tracking the requirements necessary to authenticate.

Looking at the equivalent's of these packages in the R language, pins-r side has a required_pkgs method for boards, then vetiver-r aggregates those with the modeling requirements when people run vetiver_prepare_docker().

I'll open up an issue in pins-python, so we can coordinate how to fix this!

isabelizimm commented 1 year ago

Fixed in #166, to be released in v0.2.1!