Skip to content

Commit

Permalink
Merge pull request #1102 from pytorch/fix_notebooks_directory_readme
Browse files Browse the repository at this point in the history
Modified the notebooks directory's README file
  • Loading branch information
narendasan authored Jun 9, 2022
2 parents ce9f641 + 6b5bee1 commit db6e65d
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions notebooks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The most convenient way to run these notebooks is via a docker container, which
First, clone the repository:

```
git clone https://github.com/NVIDIA/Torch-TensorRT
git clone https://github.com/pytorch/TensorRT
```

Next, navigate to the repo's root directory:
Expand All @@ -23,10 +23,10 @@ At this point, we recommend pulling the [PyTorch container](https://catalog.ngc.
from [NVIDIA GPU Cloud](https://catalog.ngc.nvidia.com/) as follows:

```
docker pull nvcr.io/nvidia/pytorch:21.12-py3
docker pull nvcr.io/nvidia/pytorch:22.05-py3
```

Replace ```21.12``` with a different string in the form ```yy.mm```,
Replace ```22.05``` with a different string in the form ```yy.mm```,
where ```yy``` indicates the last two numbers of a calendar year, and
```mm``` indicates the month in two-digit numerical form, if you wish
to pull a different version of the container.
Expand All @@ -36,14 +36,18 @@ Therefore, you can run the container and the notebooks therein without
mounting the repo to the container. To do so, run

```
docker run --gpus=all --rm -it --net=host --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 nvcr.io/nvidia/pytorch:21.12-py3 bash
docker run --gpus=all --rm -it --net=host --ipc=host \
--ulimit memlock=-1 --ulimit stack=67108864 \
nvcr.io/nvidia/pytorch:22.05-py3 bash
```

If, however, you wish for your work in the notebooks to persist, use the
```-v``` flag to mount the repo to the container as follows:

```
docker run --gpus=all --rm -it -v $PWD:/Torch-TensorRT --net=host --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 nvcr.io/nvidia/pytorch:21.12-py3 bash
docker run --gpus=all --rm -it -v $PWD:/Torch-TensorRT \
--net=host --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 \
nvcr.io/nvidia/pytorch:22.05-py3 bash
```

### b. Building a Torch-TensorRT container from source
Expand All @@ -57,7 +61,9 @@ docker build -t torch_tensorrt -f ./docker/Dockerfile .
To run this container, enter the following command:

```
docker run --gpus=all --rm -it -v $PWD:/Torch-TensorRT --net=host --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 torch_tensorrt:latest bash
docker run --gpus=all --rm -it -v $PWD:/Torch-TensorRT \
--net=host --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 \
torch_tensorrt:latest bash
```

### c. Running the notebooks inside the container
Expand Down Expand Up @@ -100,8 +106,3 @@ Within the container, the notebooks themselves are located at `/Torch-TensorRT/n
- [vgg-qat.ipynb](vgg-qat.ipynb): Quantization Aware Trained models in INT8 using Torch-TensorRT
- [EfficientNet-example.ipynb](EfficientNet-example.ipynb): Simple use of 3rd party PyTorch model library
- [CitriNet-example.ipynb](CitriNet-example.ipynb): Optimizing the Nemo Citrinet acoustic model


```python

```

0 comments on commit db6e65d

Please sign in to comment.