persistent pip install in rapids.ai docker container
This is probably a really stupid question, but one has got to start somewhere. I am playing with NVDIA's rapids.ai gpu-enhanced docker container, but this (presumably by design) does not come with pytorch. Now, of course, I can do a pip install torch torch-ignite every time, but this is both annoying and resource-consuming (and pytorch is a large download). What is the approved method for persisting a pip install in a container?

Create a new Dockerfile that builds a new image based on the existing one:

FROM the/rapids-ai/image

RUN pip install torch torch-ignite


And then

$ ls Dockerfile
Dockerfile
$ docker build -t myimage .


You can now do:

$ docker run myimage

