Python Container

Hi

I have a Python model I am working on, where I am frequently making changes and test-running the model.
I have created the Dockerfile and the requirements.txt, built the Docker image and run it. All is fine.

However, every time I want to test run the code I need to build the image and then run it; which is time-consuming as well as adding additional steps.

I want this in a docker container because I want to be able to work on this on several different computers running a variety of operating systems. I don’t want to alter the pre-existing configurations on these systems; hence Docker makes sense.

Is there a way of running a container that contains the model and all required modules, etc and will simply allow me to run the model through a simple Python command?

Not sure what you are looking for.

If you just want to speed up local development, then you could bind mount a local folder into the container. That way you could edit the files directly on local PC, then run them within the container.

Alternatively, I think there are also options to automatically build a new container image when the source code changes.