当前位置:网站首页>Path and LD_ LIBRARY_ Example of path usage
Path and LD_ LIBRARY_ Example of path usage
2022-06-29 04:08:00 【Master Yiwen】
PATH This environment variable , Since I was a freshman , Young and ignorant ,“ I'll figure it out one day ”, This is all 5 Years have passed ,5 year ! You know I'm here 5 How did the year come about !!!
What's the use ? Just check it out , The only thing I can use is take Some executables Add path to PATH in
for instance
I'm referring to it :
1. ONNX-TensorRT Installation tutorial https://zhuanlan.zhihu.com/p/380950900
2. https://github.com/onnx/onnx-tensorrt
After executing the following code block :
cd onnx-tensorrt
mkdir build && cd build
cmake .. -DTENSORRT_ROOT=<path_to_trt> && make -j
// Ensure that you update your LD_LIBRARY_PATH to pick up the location of the newly built library:
export LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH
stay build There will be an executable file under the path onnx2trt
When I was executing , It can only be carried out ./onnx2trt, It cannot be executed directly in other paths onnx2trt
therefore PATH It works :
export PATH=$(pwd):$PATH
This allows you to onnx2trt Add path to PATH in , It can be executed in any path onnx2trt, But this addition is only temporary , If you want to add it all the way to PATH in , It can be like this :
echo "export PATH=$(pwd):$PATH" >> ~/.bashrc
source ~/.bashrc # Refresh the environment variables
Be careful echo String
If there is a variable in the string , Single quotation marks are ignored , The double quotation marks will bring the variable into the string after parsing
There is another example ,CUDA After installation , We will be in ~/.bashrc Add two lines of code at the end :
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64$LD_LIBRARY_PATH
After performing nvcc -V Look at CUDA Is the installation successful , And the first line above is the guarantee nvcc The path you are in can be directly searched to , It can be executed directly nvcc
The next line leads to LD_LIBRARY_PATH
and LD_LIBRARY_PATH Usage of , If it's not a developer , But just ordinary users , It doesn't usually work
LD_LIBRARY_PATH yes Linux/UNIX Environment variables used in the system . It is used to tell the dynamic link loader where to find a shared library for a specific application .
And the above is compiled onnx2trt after , There is such a line :
export LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH
Is to add the current path to LD_LIBRARY_PATH , After performing python setup.py install You can find the installation path
alike , Compiling mmdeploy in
export LD_LIBRARY_PATH=$ONNXRUNTIME_DIR/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$TENSORRT_DIR/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$CUDNN_DIR/lib64:$LD_LIBRARY_PATH
take onnxruntime tensorrt cudnn The paths of have been added to LD_LIBRARY_PATH
In order to compile SDK You can find the path
OK, be it so
边栏推荐
- I came from a major, so I didn't want to outsource
- 自己动手搭建一个简单的网站
- Influence of air resistance on the trajectory of table tennis
- 增额终身寿险下架了吗?现在还有哪些增额终身寿险产品?
- 选对学校,专科也能进华为~早知道就好了
- String不同创建方式的区别
- Pytorch read / write file
- Data statistical analysis (SPSS) [3]
- 【C语言】解决 “address of stack memory associated with local variable ‘num‘ returned”
- 干货丨微服务架构是什么?有哪些优点和不足?
猜你喜欢

How to merge upstream and downstream SQL data records

开发者方案 · 环境监测设备(小熊派物联网开发板)接入涂鸦IoT开发平台
![[FPGA mathematical formula] use FPGA to realize common mathematical formulas](/img/b9/e6f219738b106a96b0f5323ee61cca.png)
[FPGA mathematical formula] use FPGA to realize common mathematical formulas

MySQL column to row conversion without Union

c语言 --- 分支结构

干货丨微服务架构是什么?有哪些优点和不足?

SQL 数据记录如何上下行合并
![[Brillouin phenomenon] Study on simultaneous measurement system of Brillouin temperature and strain distribution in optical fiber](/img/92/57792ef733964230d36e0b9bb218b4.png)
[Brillouin phenomenon] Study on simultaneous measurement system of Brillouin temperature and strain distribution in optical fiber

Establishment of small and medium-sized enterprise network

要不是和阿里P7聊过,我也不知道自己是个棒槌
随机推荐
快速开发项目-VScode插件
【C语言】开启一个线程
二叉树序列化与反序列化(leetcode(困难))
Data statistical analysis (SPSS) [3]
Build a simple website by yourself
Call snapstateon closed sou from Oracle CDC
5-minute NLP: summary of time chronology from bag of words to transformer
在命令行登录mysql数据库以及查看版本号
Data statistical analysis (SPSS) [7]
logstash启动过慢甚至卡死
On June 27, 2022, I have the right to choose the journey of the summer vacation.
Establishment of small and medium-sized enterprise network
我的创作纪念日
请问大佬,Oracle CDC报错 Call snapshotState on closed sou
Zhai Jia: from technical engineer to open source entrepreneur of "net red"
科班出身,结果外包都不要
【C语言】 详解线程退出函数 pthread_exit
科技雲報道:混合辦公的B面:安全與效率如何兼得?
Draft competition process of Intelligent Vision Group
NotImplementedError: Could not run torchvision::nms