From the course: Google Cloud Professional Machine Learning Engineer Cert Prep

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Demo: Rust pretrained PyTorch microservice

Demo: Rust pretrained PyTorch microservice

- [Instructor] Here we have a pre-trained PyTorch model alongside of a Rust Actix microservice. Let's go ahead and dive into the code here. I've got this running inside of GitHub Codespaces and I have this rtorchdist directory. So first thing we'll do is cd into here and we'll get this cooking. Now, if we look at this directory here, I like to use Makefiles. And you can see here that if I did, basically, a make dbuild, that would build the Docker container. If I said make build, this would actually build the release here. And in this case, let's go ahead and say make build. You can see here that it shows me that I can run this particular command. So let's go ahead and do that, cargo build -j 16. Perfect. We've already built this previously and so we just checked the binary. Now, if I want to run this, I can also just type in cargo run and this is a way to actually run the project, as well. So the build just compiles it…

Contents