4.1 use of tritonclient c++
4.2 use of triton c++
4.3 Dependency installation
1. Install minconda
Minconda is a lightweight alternative to Anaconda. By default, only python and conda are installed, but you can install the required packages through pip and conda
1) download
Download the version of Miniconda that matches your own system from the official website — conda documentation
wget https://repo.anaconda.com/miniconda/Miniconda3-py38_4.12.0-Linux-x86_64.sh
bash Miniconda3-py38_4.12.0-Linux-x86_64.sh
一路enter或yes
The installation location is PREFIX=/root/minanaconda3
export CONDA_EXE='/root/miniconda3/bin/conda'
export _CE_M=''
export _CE_CONDA=''
export CONDA_PYTHON_EXE='/root/miniconda3/bin/python'
2) Set environment variables
echo export PATH=/root/miniconda3/bin:$PATH >> ~/.bashrc
source ~/.bashrc
Check the version information, if the value of PYTHONPATH is set, please unset pythonpath
3) Change source
When using conda install, it is downloaded from the conda-forge channel by default.
Tsinghua source can be added
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
4) Use the conda virtual environment
Step 1: Create a virtual environment
conda create -n myenv python=3.8 -y
Step 2: Activate the virtual environment
conda activate myenv
The reason for this problem is that there is a problem with the activation command of conda. The solution is as follows
source activate
You can see that it was successfully activated and entered the myenv environment
2. Install faiss gpu
conda install faiss-gpu
Ask the next question
The solution is
conda config --add channels conda-forge
The faiss-gpu version is 1.7.2, and some installed software will be automatically updated at the same time.
numpy, faiss, cudatoolkit and other software are installed, conda, openssl and other software are updated
Install the specified version of faiss-gpu, faiss-cpu
conda install faiss-gpu==1.7.0
The available versions of faiss-gpu are as follows
Install the specified version of faiss-cpu
conda install faiss-cpu==1.7.1
3. Install pytorch
conda install pytorch -y
##卸载
conda uninstall pytorch
The latest version of pytorch will be installed, and the specified version of pytorch will be installed, such as
conda install pytorch=0.1.10
Install pytorch that conforms to the cuda version, the official website Start Locally | PyTorch
The installation command is as follows
conda install pytorch torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia
You can see that cuda is installed
4. Install opencv
conda install opencv
##卸载
conda uninstall opencv
The latest version of opencv4.6 is installed by default, and ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /root/blender/3.2/python/ lib/python3.10/site-packages/../../libopencv_gapi.so.406)
And strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX found that GLIBCXX_3.4.30 is not supported, the best way is to downgrade opencv, and upgrading libstdc++.so.6 will be troublesome and may will not succeed
Install the specified version of opencv
conda install opencv-python==4.5.1.48 -y
Note the available opencv versions
5. Install skimage
conda instal scikit-image
6. Install kafka
conda install kafka-python