I've installed tensorflow in a remote machine, then connected it via remote VSCode.
I've also installed tensorflow following the installation guide that I have the conda environment with the name atnwf
in the remote machine.
I also learned that jupyter notebook does not keep environment variables so that I set the proper LD_LIBRARY_PATH
using %env
in my notebook.
%env LD_LIBRARY_PATH=/home/grad/tomandjerry/anaconda3/envs/atnwf/lib/
However still the tensorflow warning message says
2022-12-21 13:46:29.064619: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/grad/tomandjerry/anaconda3/envs/atnwf/lib/
I've already checked that the library was installed in the corresponding path. Moreover, I verified the basic installation.
(atnwf) [lib]$ python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"
2022-12-21 14:02:34.992430: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2022-12-21 14:02:36.382350: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: :/lib/:/home/grad/tomandjerry/anaconda3/envs/atnwf/lib/:/home/grad/tomandjerry/anaconda3/envs/atnwf/lib/:/home/grad/tomandjerry/anaconda3/envs/atnwf/lib/
2022-12-21 14:02:36.382611: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: :/lib/:/home/grad/tomandjerry/anaconda3/envs/atnwf/lib/:/home/grad/tomandjerry/anaconda3/envs/atnwf/lib/:/home/grad/tomandjerry/anaconda3/envs/atnwf/lib/
2022-12-21 14:02:36.382633: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
[PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU'), PhysicalDevice(name='/physical_device:GPU:1', device_type='GPU')]
How can I resolve the "not found" issue correctly?
I tried re-installing all the packages in the conda environment by resetting a new environment with another name. I've also tried the method editing kernelspec stated in How to set env variable in Jupyter notebook.