Deploying a Simple TensorFlow Model


This project covers creating a TensorFlow model, exporting it for TensorFlow Serving, and deploying it with Docker. You'll learn to set up, serve, and test your model in a few concise steps, making it accessible for predictions.

LinuxDockerMachine Learning


This project is designed to guide you through the process of creating a simple TensorFlow model, exporting it, and then serving it using Docker and TensorFlow Serving. TensorFlow is an open-source machine learning framework, and TensorFlow Serving is a flexible, high-performance serving system for machine learning models. Docker containers make it easy to package and deploy these models consistently. By the end of this project, you'll understand how to set up a basic machine learning model in TensorFlow, export it for serving, and deploy it using TensorFlow Serving inside a Docker container.

👀 Preview

## Send a prediction request to the TensorFlow Serving container
curl -X POST \
  http://localhost:9501/v1/models/half_plus_two:predict \
  -d '{"signature_name":"serving_default","instances":[[1.0], [2.0], [5.0]]}'


  "predictions": [[2.5], [3.0], [4.5]

🎯 Tasks

In this project, you will learn:

  • How to install TensorFlow and TensorFlow Serving dependencies
  • How to create a simple TensorFlow model for basic arithmetic operations
  • How to export the model in a format suitable for serving with TensorFlow Serving
  • How to serve the model using Docker and TensorFlow Serving
  • How to send prediction requests to the deployed model and receive predictions

🏆 Achievements

After completing this project, you will be able to:

  • Set up a basic machine learning model in TensorFlow
  • Export a TensorFlow model for serving
  • Deploy a TensorFlow model using Docker and TensorFlow Serving
  • Send prediction requests to the deployed model and observe the results




Labby is the LabEx teacher.