Before diving into the details, let’s take a look at the code organization of this sample project:
|--program
| |--nginx.conf
| |--predictor.py
| |--serve
| |--train
| `--wsgi.py
|
|--Dockerfile
`--requirements.txt
Dockerfile is the Docker file used to build the Docker image, and requirements.txt contains the necessary libraries to install. The files inside the program
directory define how the container (server) operates. Among them, nginx.conf, wsgi.py, and serve are pre-built and do not require modifications. The train file defines how the model is trained, while predictor.py specifies how the model makes predictions (handling HTTP responses).