From the course: DevOps for Data Scientists

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Creating a Dockerfile for data science models

Creating a Dockerfile for data science models

From the course: DevOps for Data Scientists

Start my 1-month free trial

Creating a Dockerfile for data science models

- [Instructor] We can create Docker containers to run our data science models. We start by defining a Dockerfile. A Dockerfile is a text file that contains instructions on what software to include in the Docker image. And the commands that should be run when starting the Docker image. Here are few Dockerfile commands we'll use to build a Docker image that will have the software needed to run a data science model. We'll take a look at each of these commands. The FROM command holds a base image from your Docker repository. In this example, we have a base image called python:3.6. It contains a Linux operating system, as well as an installation of Python 3. Now it's a good practice to update the base operating system when creating a background image. This will install patches to the system. We do that by using the RUN command, and passing in the apt-get update command. This command will work for the version of Linux used in the python:3.6 base image. Other operating systems may have…

Contents