How to create a container from an image
-
I have this following image:
REPOSITORY TAG IMAGE ID CREATED SIZE nvcr.io/nvidia/pytorch 18.04-py3 c3555fec4fe6 3 years ago 5.9GB
The goal is to use Ubuntu 18.04 with CUDA 10.2. Now I want to create a container with this image. How can I do that? The guides online didn't make much sense to me as I'm pretty new to docker.
-
Depending on what you want to do, there are a lot of options you can pass in to docker, but if you just want to run the code in the container as written:
docker run nvcr.io/nvidia/pytorch:18.04-py3
or
docker run c3555fec4fe6
or even
docker run c3
you can give your docker images a more reasonable name with
docker image tag nvcr.io/nvidia/pytorch:18.04-py3 pytorch
and run that with
docker run pytorch
see
man docker-run
man docker-image-tag
and https://docs.docker.com/engine/reference/commandline/run/