Looking for a Bazel / Bazelisk WORKSPACE file. It’s for compiling TensorFlow C++ programs on the Jetson Orin Nano.
I’m getting an error:
in cc_toolchain_alias rule @bazel_tools//tools/cpp:current_cc_toolchain: Unable to find a CC toolchain using toolchain resolution. Did you properly set --platforms?
Does anyone have one that works?
You don’t need to build it manually.
We have a prebuilt TensorFlow package in the below link:
Thanks for your help AastaLLL. I’m looking to compile my own C++ program. I ran into a problem where the Tensor Flow Python API uses the GPU but the C++ API doesn’t. When I searched most people used Bezal/Bezalisk to help compile. Thought that may help the problem.
FYI currently, I’m using dustynv:ml_docker container that already has Tensor Flow installed.
Does your problem solve after using dustynv:ml_docker container?
Unfortunately not yet. There was a error mentioning that the protoc was too new for TensorFlow 2.11.0 on the docker. Tried downloading and installing older protoc and building it with a BUILD and WORKSPACE file Frankenstein from online. This was problematic. Started a new aproach.
Building GCC to version 11 (the highest allowed by cuda) and then TensorFlow 2.0 from source to get the exact prerequisites and Bazel BUILD and WORKSPACE files. See how that goes.
During compiling of TensorFlow 2 from source ran into this problem:
ERROR: Source forest creation failed: readdir (/home/pmcgrath/.cache/bazel/_bazel_pmcgrath/93ea0766e72e9dc317f0be4017415dcb/execroot/org_tensorflow/local-spawn-runner.17875378218212201089) (Bad message)
INFO: Elapsed time: 51.086s, Critical Path: 0.00s
INFO: 0 processes.
FAILED: Build did NOT complete successfully
Tried to ‘ls’ the file and got:
ls: cannot access ‘/home/pmcgrath/.cache/bazel/_bazel_pmcgrath/93ea0766e72e9dc317f0be4017415dcb/execroot/org_tensorflow/CODE_OF_CONDUCT.md’: Structure needs cleaning
Online there is reference to unmounting and run a e2fsck command.
Upon removing the docker container also got:
ERRO Error waiting for container: container 097f0447bc654b5ba8c3ba0126fce1402df7863596f68768b531a4d19a6a4c68: driver “overlay2” failed to remove root filesystem: unlinkat /var/lib/docker/overlay2/146ddf6f257c0d7fb54faa934315a132b5f21983d78f9074181971211ea12ae1/diff/home/pmcgrath/.cache/bazel/_bazel_pmcgrath/93ea0766e72e9dc317f0be4017415dcb/execroot/org_tensorflow/bazel-out/_actions: structure needs cleaning
Has anyone come across this before?
Have you added the
--runtime nvidia flag when you launch the container?
Ended up having file corruption down to the base metal. Reimaged and Reinstalled L4T.
In the end abandoned the approach to compile TensorFlow2.
Went back to the dustynv ml-docker container and got that working. Now happily compiling with TensorFlow2 C++ API.
Good to know it works now.
Thanks for sharing the status.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.