I have an image called: Image
and a running container called: container
. I want to install pytorch
and anacoda
. what's the easiest way to do this? Do I have to change the dockerfile
and build a new image? Thanks a lot.
相关问题
- Docker task in Azure devops won't accept "$(pw
- Is shmid returned by shmget() unique across proces
- how to get running process information in java?
- Unable to run mariadb when mount volume
- Unspecified error (0x80004005) while running a Doc
Yes, the best thing is to build your image in such a way it has the python modules are in there.
Here is an example. I build an image with the build dependencies:
Note, I am installing Python's pip inside the image, so later I can download packages from pypi. Packages like numpy might require a C compiler and tool chain, so I am installing these too.
After building the packages which require the build tools chain I remove the tool chain packages:
After you have your base image, you can run your application code in an image building on top of it:
I simply run this with
docker
.