|
83 | 83 | "\n",
|
84 | 84 | "Docker is more powerful than environment managers like conda or virtualenv because (a) it is completely language independent and (b) it comprises your whole operating environment, including startup commands, environment variable, etc.\n",
|
85 | 85 | "\n",
|
86 |
| - "In some ways, a docker container is like a virtual machine, but it is much lighter weight. For example, a program running in a container can start in less than a second and many containers can run on the same physical machine or virtual machine instance.\n", |
| 86 | + "In some ways, a Docker container is like a virtual machine, but it is much lighter weight. For example, a program running in a container can start in less than a second and many containers can run on the same physical machine or virtual machine instance.\n", |
87 | 87 | "\n",
|
88 | 88 | "Docker uses a simple file called a `Dockerfile` to specify how the image is assembled. We'll see an example of that below. You can build your Docker images based on Docker images built by yourself or others, which can simplify things quite a bit.\n",
|
89 | 89 | "\n",
|
|
140 | 140 | "\n",
|
141 | 141 | "#### Running your container during hosting\n",
|
142 | 142 | "\n",
|
143 |
| - "Hosting has a very different model that training because hosting is reponding to inference requests that come in via HTTP. In this example, we use our recommended Python serving stack to provide robust and scalable serving of inference requests:\n", |
| 143 | + "Hosting has a very different model than training because hosting is reponding to inference requests that come in via HTTP. In this example, we use our recommended Python serving stack to provide robust and scalable serving of inference requests:\n", |
144 | 144 | "\n",
|
145 | 145 | "\n",
|
146 | 146 | "\n",
|
|
180 | 180 | "Let's discuss each of these in turn:\n",
|
181 | 181 | "\n",
|
182 | 182 | "* __`Dockerfile`__ describes how to build your Docker container image. More details below.\n",
|
183 |
| - "* __`build_and_push.sh`__ is a script that users the Dockerfile to build your container images and then pushes it to ECR. We'll invoke the commands directly later in this notebook, but you can just copy and run the script for your own algorithms.\n", |
| 183 | + "* __`build_and_push.sh`__ is a script that uses the Dockerfile to build your container images and then pushes it to ECR. We'll invoke the commands directly later in this notebook, but you can just copy and run the script for your own algorithms.\n", |
184 | 184 | "* __`decision_trees`__ is the directory which contains the files that will be installed in the container.\n",
|
185 | 185 | "* __`local_test`__ is a directory that shows how to test your new container on any computer that can run Docker, including an Amazon SageMaker notebook instance. Using this method, you can quickly iterate using small datasets to eliminate any structural bugs before you use the container with Amazon SageMaker. We'll walk through local testing later in this notebook.\n",
|
186 | 186 | "\n",
|
|
387 | 387 | "source": [
|
388 | 388 | "## Create an estimator and fit the model\n",
|
389 | 389 | "\n",
|
390 |
| - "In order to use SageMaker to fit our algorithm, we'll create an `Estimator` that defines how to use the container to to train. This includes the configuration we need to invoke SageMaker training:\n", |
| 390 | + "In order to use SageMaker to fit our algorithm, we'll create an `Estimator` that defines how to use the container to train. This includes the configuration we need to invoke SageMaker training:\n", |
391 | 391 | "\n",
|
392 |
| - "* The __container name__. This is constucted as in the shell commands above.\n", |
| 392 | + "* The __container name__. This is constructed as in the shell commands above.\n", |
393 | 393 | "* The __role__. As defined above.\n",
|
394 | 394 | "* The __instance count__ which is the number of machines to use for training.\n",
|
395 | 395 | "* The __instance type__ which is the type of machine to use for training.\n",
|
|
0 commit comments