-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Docker to deploy a model for #TidyTuesday LEGO sets | Julia Silge #76
Comments
This is awesome!! Thank you very much. Could you please make a similar post for analytics related work flow. For example, Analysis where ML models are not used/needed but just simple analysis and save analysis output as csv in the cloud platforms such as aws or azure with the help of docker. Thanks, |
Hi Julia, Thank you for the screencast with docker and vetiver. I was able to follow along with most of the code. I don't have access to rs_connect() so I was trying build the board with board_folder(). The pin is created fine as well as the docker, plumber, and lock file but not for the life of me can I get
to run properly. I keep getting messages that docker can't find the pin (I have an intel chip MAC, and am local so removed the platform and .Renviron parts). I am trying to navigate to a Box location, but I also tried placing the pin on my desktop and was running into the same issue. Wondering if you might be able to spot what I am doing incorrectly. I'm new to docker and vetiver and most of the examples are showing deployment with rs_connect() which I wish we could do, but for those trying to play with vetiver with a team on a local network there are less examples. (Just as an fyi, for this question, I replaced my MAC username with ... from the path below for privacy)
The docker file shows
and the plumber file shows
Docker build works fine, but when I run
in the terminal, it returns this
I'm probably doing something really silly, but I can't figure out what is wrong. Any guidance or advice you could provide would be most appreciated. Thank you for all you do for the R community. |
Oh @wdefreitas I don't think that's silly at all. The thing to focus on is that your Docker container (which is like a separate little computer) needs to be able to get to where your pin is stored. If your pin is outside of the container locally on your computer, the container can't get to it, because those are like two separate computers. When the pin is stored somewhere like Connect, you can give the Docker container access by giving it the right credentials. You could do something similar with a cloud platform, like using AWS S3. If you really want to do something totally local, just for learning, you could put the pin inside of the Docker container. This isn't a recommended pattern for deployment because having the model artifact separate from the API deployment has so many benefits. However, it does work; take a look at this gist that walks through how to do it. |
Hi Julia, does the dockerized model also do all the preprocessing steps? Say I have to do PCA at some point, will this reduce the dimensionality of the data I pass to the API internally and then predict based on that? Thanks for all the educational stuff! I will follow your MLOPs career and hope you still find time to do these videos which are a great help! Best |
@blechturm If you use tidymodels or scikit-learn to bundle your preprocessing and model estimation together in a workflow or a pipeline, then YES. 👍 We think for typical use cases, the best choice is to deploy these pieces together. |
could you make a video explaining how to deploy a model with shiny |
@mohamed123hany You may find this demo from Posit Solution Engineering helpful. |
Use Docker to deploy a model for #TidyTuesday LEGO sets | Julia Silge
A data science blog
https://juliasilge.com/blog/lego-sets/
The text was updated successfully, but these errors were encountered: