Skip to content

Commit 7f60b18

Browse files
committed
docs: Update jetson instructions
Signed-off-by: Naren Dasan <[email protected]> Signed-off-by: Naren Dasan <[email protected]>
1 parent d6ea0d5 commit 7f60b18

File tree

1 file changed

+9
-61
lines changed

1 file changed

+9
-61
lines changed

docsrc/tutorials/installation.rst

Lines changed: 9 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -303,54 +303,13 @@ Enviorment Setup
303303

304304
To build natively on aarch64-linux-gnu platform, configure the ``WORKSPACE`` with local available dependencies.
305305

306-
1. Disable the rules with ``http_archive`` for x86_64 by commenting the following rules:
307-
308-
.. code-block:: shell
309-
310-
#http_archive(
311-
# name = "libtorch",
312-
# build_file = "@//third_party/libtorch:BUILD",
313-
# strip_prefix = "libtorch",
314-
# urls = ["https://download.pytorch.org/libtorch/cu102/libtorch-cxx11-abi-shared-with-deps-1.5.1.zip"],
315-
# sha256 = "cf0691493d05062fe3239cf76773bae4c5124f4b039050dbdd291c652af3ab2a"
316-
#)
317-
318-
#http_archive(
319-
# name = "libtorch_pre_cxx11_abi",
320-
# build_file = "@//third_party/libtorch:BUILD",
321-
# strip_prefix = "libtorch",
322-
# sha256 = "818977576572eadaf62c80434a25afe44dbaa32ebda3a0919e389dcbe74f8656",
323-
# urls = ["https://download.pytorch.org/libtorch/cu102/libtorch-shared-with-deps-1.5.1.zip"],
324-
#)
325-
326-
# Download these tarballs manually from the NVIDIA website
327-
# Either place them in the distdir directory in third_party and use the --distdir flag
328-
# or modify the urls to "file:///<PATH TO TARBALL>/<TARBALL NAME>.tar.gz
329-
330-
#http_archive(
331-
# name = "cudnn",
332-
# urls = ["https://developer.nvidia.com/compute/machine-learning/cudnn/secure/8.0.1.13/10.2_20200626/cudnn-10.2-linux-x64-v8.0.1.13.tgz"],
333-
# build_file = "@//third_party/cudnn/archive:BUILD",
334-
# sha256 = "0c106ec84f199a0fbcf1199010166986da732f9b0907768c9ac5ea5b120772db",
335-
# strip_prefix = "cuda"
336-
#)
337-
338-
#http_archive(
339-
# name = "tensorrt",
340-
# urls = ["https://developer.nvidia.com/compute/machine-learning/tensorrt/secure/7.1/tars/TensorRT-7.1.3.4.Ubuntu-18.04.x86_64-gnu.cuda-10.2.cudnn8.0.tar.gz"],
341-
# build_file = "@//third_party/tensorrt/archive:BUILD",
342-
# sha256 = "9205bed204e2ae7aafd2e01cce0f21309e281e18d5bfd7172ef8541771539d41",
343-
# strip_prefix = "TensorRT-7.1.3.4"
344-
#)
345-
346-
NOTE: You may also need to configure the CUDA version to 10.2 by setting the path for the cuda new_local_repository
347-
306+
1. Replace ``WORKSPACE`` with the corresponding WORKSPACE file in ``//toolchains/jp_workspaces``
348307

349308
2. Configure the correct paths to directory roots containing local dependencies in the ``new_local_repository`` rules:
350309

351310
NOTE: If you installed PyTorch using a pip package, the correct path is the path to the root of the python torch package.
352-
In the case that you installed with ``sudo pip install`` this will be ``/usr/local/lib/python3.6/dist-packages/torch``.
353-
In the case you installed with ``pip install --user`` this will be ``$HOME/.local/lib/python3.6/site-packages/torch``.
311+
In the case that you installed with ``sudo pip install`` this will be ``/usr/local/lib/python3.8/dist-packages/torch``.
312+
In the case you installed with ``pip install --user`` this will be ``$HOME/.local/lib/python3.8/site-packages/torch``.
354313

355314
In the case you are using NVIDIA compiled pip packages, set the path for both libtorch sources to the same path. This is because unlike
356315
PyTorch on x86_64, NVIDIA aarch64 PyTorch uses the CXX11-ABI. If you compiled for source using the pre_cxx11_abi and only would like to
@@ -360,27 +319,16 @@ use that library, set the paths to the same path but when you compile make sure
360319
361320
new_local_repository(
362321
name = "libtorch",
363-
path = "/usr/local/lib/python3.6/dist-packages/torch",
322+
path = "/usr/local/lib/python3.8/dist-packages/torch",
364323
build_file = "third_party/libtorch/BUILD"
365324
)
366325
367326
new_local_repository(
368327
name = "libtorch_pre_cxx11_abi",
369-
path = "/usr/local/lib/python3.6/dist-packages/torch",
328+
path = "/usr/local/lib/python3.8/dist-packages/torch",
370329
build_file = "third_party/libtorch/BUILD"
371330
)
372331
373-
new_local_repository(
374-
name = "cudnn",
375-
path = "/usr/",
376-
build_file = "@//third_party/cudnn/local:BUILD"
377-
)
378-
379-
new_local_repository(
380-
name = "tensorrt",
381-
path = "/usr/",
382-
build_file = "@//third_party/tensorrt/local:BUILD"
383-
)
384332
385333
Compile C++ Library and Compiler CLI
386334
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -389,19 +337,19 @@ Compile C++ Library and Compiler CLI
389337

390338
.. code-block:: shell
391339
392-
--platforms //toolchains:jetpack_4.x
340+
--platforms //toolchains:jetpack_x.x
393341
394342
395343
Compile Torch-TensorRT library using bazel command:
396344

397345
.. code-block:: shell
398346
399-
bazel build //:libtorchtrt --platforms //toolchains:jetpack_4.6
347+
bazel build //:libtorchtrt --platforms //toolchains:jetpack_5.0
400348
401349
Compile Python API
402350
^^^^^^^^^^^^^^^^^^^^
403351

404-
NOTE: Due to shifting dependencies locations between Jetpack 4.5 and Jetpack 4.6 there is now a flag for ``setup.py`` which sets the jetpack version (default: 4.6)
352+
NOTE: Due to shifting dependencies locations between Jetpack 4.5 and newer Jetpack verisons there is now a flag for ``setup.py`` which sets the jetpack version (default: 5.0)
405353

406354
Compile the Python API using the following command from the ``//py`` directory:
407355

@@ -411,4 +359,4 @@ Compile the Python API using the following command from the ``//py`` directory:
411359
412360
If you have a build of PyTorch that uses Pre-CXX11 ABI drop the ``--use-cxx11-abi`` flag
413361

414-
If you are building for Jetpack 4.5 add the ``--jetpack-version 4.5`` flag
362+
If you are building for Jetpack 4.5 add the ``--jetpack-version 5.0`` flag

0 commit comments

Comments
 (0)