What is Caffe2?
Caffe2 is a deep-learning framework designed to easily express all model types, for example, CNN, RNN, and more, in a friendly python-based API, and execute them using a highly efficiently C++ and CUDA back-end.
It allows a large amount of flexibility for the user to assemble their model, whether for inference or training, using combinations of high-level and expressive operations, before running through the same python interface allowing for easy visualization, or serializing the created model and directly using the underlying C++ implementation.
Caffe2 supports single and multi-GPU execution, along with support for multi-node execution.
Before you can run an NGC deep learning framework container, your Docker environment must support NVIDIA GPUs. To run a container, issue the appropriate command as explained in the Running A Container chapter in the NVIDIA Containers And Frameworks User Guide and specify the registry, repository, and tags. For more information about using NGC, refer to the NGC Container User Guide.
The method implemented in your system depends on the DGX OS version installed (for DGX systems), the specific NGC Cloud Image provided by a Cloud Service Provider, or the software that you have installed in preparation for running NGC containers on TITAN PCs, Quadro PCs, or vGPUs.
Select the Tags tab and locate the container image release that you want to run.
In the Pull Tag column, click the icon to copy the
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. A typical command to launch the container is:
docker run --gpus all -it --rm -v local_dir:container_dir nvcr.io/nvidia/caffe2:xx.xx-pyx
-itmeans run in interactive mode
--rmwill delete the container when finished
-vis the mounting directory
local_diris the directory or file from your host system (absolute path) that you want to access from inside your container. For example, the
local_dirin the following path is
If you are inside the container, for example,
ls /data/mnist, you will see the same files as if you issued the
ls /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:
xx.xxis the container version. For example,
pyxis the Python version. For example,
You have pulled the latest files and run the container image.
Note: In order to share data between ranks, NCCL may require shared system memory for IPC and pinned (page-locked) system memory resources. The operating system’s limits on these resources may need to be increased accordingly. Refer to your system’s documentation for details. In particular, Docker containers default to limited shared and pinned memory resources. When using NCCL inside a container, it is recommended that you increase these resources by issuing:
--shm-size=1g --ulimit memlock=-1
in the command line to:
docker run --gpus all
/workspace/README.mdinside the container for information on customizing your Caffe2 image.
For the latest Release Notes, see the Caffe2 Release Notes Documentation website.
For more information about Caffe2, including tutorials, documentation, and examples, see: