diff --git a/CHANGELOG.md b/CHANGELOG.md index 5967a3b17..d6d25bf14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ Major updates and new features to this project will be listed in this document. +## August 31, 2020 + +* Added initial support for [Running in Docker Containers](docs/aux-docker.md) +* Changed OpenGL behavior to show window on first frame +* Minor bug fixes and improvements + ## July 15, 2020 > **note:** API changes from this update are intended to be backwards-compatible, so previous code should still run. diff --git a/README.md b/README.md index e34e3c65d..61bf06985 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,7 @@ Hello AI World can be run completely onboard your Jetson, including inferencing * [Camera Streaming and Multimedia](docs/aux-streaming.md) * [Image Manipulation with CUDA](docs/aux-image.md) +* [Running in Docker Containers](docs/aux-docker.md) * [Deep Learning Nodes for ROS/ROS2](https://github.com/dusty-nv/ros_deep_learning) ## API Reference diff --git a/docs/aux-docker.md b/docs/aux-docker.md new file mode 100644 index 000000000..4ae654cad --- /dev/null +++ b/docs/aux-docker.md @@ -0,0 +1,88 @@ + +

Back | Next | Contents +
+Appendix

+ +# Running in Docker Containers + +Docker container images for this project are hosted at [`dustynv/jetson-inference`](https://hub.docker.com/r/dustynv/jetson-inference). + +Below are the currently available tags: + +| Container Tag | L4T version | JetPack version | +|-----------------------------------------------------------------------------------------|:-----------:|:--------------------------------:| +| [`dustynv/jetson-inference:r32.4.3`](https://hub.docker.com/r/dustynv/jetson-inference) | L4T R32.4.3 | JetPack 4.4 (production release) | + +> ***note:*** the version of JetPack-L4T that you have installed on your Jetson needs to match the tag above. + +These containers use the l4t-pytorch base container, so support for transfer learning / re-training is already included. + +## Launching the Container + +Due to various mounts and devices needed to run the container, it's recommended to use the [`docker/run.sh`](../docker/run.sh) script to run the jetson-inference container: + +```bash +$ git clone --recursive https://github.com/dusty-nv/jetson-inference +$ cd jetson-inference +$ docker/run.sh +``` + +> ***note:*** because of the Docker scripts used and the data directory structure that gets mounted into the container, you should still clone the project on your host device (i.e. even if not intending to build/install the project natively) + +[`docker/run.sh`](../docker/run.sh) will automatically pull the correct container tag from DockerHub based on your currently-installed version of JetPack-L4T, and mount the appropriate data directories and devices so that you can use cameras/display/ect from within the container. It will also prompt you to download DNN models if you haven't already done so, which get mounted into the container to use. + +### Mounted Data Volumes + +For reference, the following paths automatically get mounted from your host device into the container: + +* `jetson-inference/data` (stores the network models, serialized TensorRT engines, and test images) +* `jetson-inference/python/training/classification/data` (stores classification training datasets) +* `jetson-inference/python/training/classification/models` (stores classification models trained by PyTorch) +* `jetson-inference/python/training/detection/ssd/data` (stores detection training datasets) +* `jetson-inference/python/training/detection/ssd/models` (stores detection models trained by PyTorch) + +These mounted volumes assure that the models and datasets are stored outside the container, and aren't lost when the container is shut down. + +If you wish to mount your own path into the container, you can use the `--volume HOST_DIR:MOUNT_DIR` argument to [`docker/run.sh`](../docker/run.sh): + +```bash +$ docker/run.sh --volume /my/host/path:/my/container/path +``` + +For more info, see `docker/run.sh --help`: + +```bash + -v, --volume HOST_DIR:MOUNT_DIR Mount a path from the host system into + the container. Should be specified as: + + -v /my/host/path:/my/container/path + + (these should be absolute paths) +``` + +## Running Applications + +Once the container is running, you can run example programs from the tutorial like normal: + +```bash +# cd build/aarch64/bin +# ./video-viewer /dev/video0 +# ./imagenet images/jellyfish.jpg images/test/jellyfish.jpg +# ./detectnet images/peds_0.jpg images/test/peds_0.jpg +``` + +## Building the Container + +If you wish to re-build the container or build your own, you can use the [`docker/build.sh`](../docker/build.sh) script which builds the project's [`Dockerfile`](../Dockerfile): + +```bash +$ docker/build.sh +``` + +> ***note:*** first you should set your default `docker-runtime` to nvidia, see [here](https://github.com/dusty-nv/jetson-containers#docker-default-runtime) for the details. + + +## +

Back | Image Manipulation with CUDA

+

© 2016-2020 NVIDIA | Table of Contents

+ diff --git a/docs/aux-image.md b/docs/aux-image.md index 644dea6af..4318d6002 100644 --- a/docs/aux-image.md +++ b/docs/aux-image.md @@ -1,5 +1,5 @@ -

Back | Next | Contents +

Back | Next | Contents
Appendix

@@ -450,6 +450,8 @@ CUDA(cudaOverlay(imgInputB, dimsB, imgOutput, dimsOutput, dimsA.x, 0)); ``` ## -

Back | Camera Streaming and Multimedia

+

Next | Running in Docker Containers +
+Back | Camera Streaming and Multimedia

© 2016-2020 NVIDIA | Table of Contents