
pytorch is a Python package that provides two high-level features:
- Tensor computation (like numpy) with strong GPU acceleration
- Deep Neural Networks built on a tape-based autograd system
You can reuse your favorite Python packages such as numpy, scipy and Cython to extend pytourch when needed.
Running pytorch :
Before running the container, use docker pull to ensure an up-to-date image is installed. Once the pull is complete, you can run the container image.
Procedure :
- In the Tags section, locate the container image release that you want to run.
- In the Pull column, click the icon to copy the
docker pullcommand. - Open a command prompt and paste the pull command. The pulling of the container image begins. Ensure the pull completes successfully before proceeding to the next step.
- Run the container image. To run the container, choose interactive mode or non-interactive mode.a. Interactive mode: Open a command prompt and issue:
nvidia-docker run -it --rm -v local_dir:container_dir nvcr.io/nvidia/pytorch:<xx.xx>
b. Non-interactive mode: Open a command prompt and issue:
nvidia-docker run --rm -v local_dir:container_dir nvcr.io/nvidia/pytorch:<xx.xx> <command>
Where:
-itmeans run in interactive mode--rmwill delete the container when finished-vis the mounting directorylocal_diris the directory or file from your host system (absolute path) that you want to access from inside your container. For example, thelocal_dirin the following path is/home/jsmith/data/mnist.-v /home/jsmith/data/mnist:/data/mnistIf you are inside the container, for example,ls /data/mnist, you will see the same files as if you issued thels /home/jsmith/data/mnistcommand from outside the container.container_diris the target directory when you are inside your container. For example,/data/mnistis the target directory in the example:-v /home/jsmith/data/mnist:/data/mnist<xx.xx>is the tag. For example,17.06.<command>is the command you want to run in the image.
| For any queries, raise a ticket in the helpdesk or please contact System Administrator, #103,SERC. |
