Can i make my pytorch model to docker image?

I want to pack my model to docker image.
Cause i’m beginner in domain of docker, i just know one solution - make a REST API server with pytorch model and make it as docker image. Then, when use this docker server, send request to train or test model.
Is there other options??

Thank you