anibali/docker-pytorch

how to install other python package ?

Hackerlil opened this issue ยท 3 comments

such as :pandas

Also having the same problem. Did you work it out? I'm currently doing this sort of thing:

import subprocess
subprocess.run(['bash','-c', "pip install ..."])

Would be happy to learn an easier way though! I don't know enough about Docker to know whether the repl can be escaped given that the docker file ends with CMD ["python3"].

Edit: Repo maintainer recommends creating a separate dockerfile for this sort of thing I think: #12 (comment)

@josephrocca You can always override the CMD by specifying a different command on the CLI when you run the container. For example, docker run -it anibali/pytorch:cuda-10.1 bash will run bash instead of python3.

Oh wow, I think I should go off now and do an intro-to-docker course. Thanks for that! And thanks for this very hand image ๐Ÿ‘