Tensor.Art
Create

How to Unlocking the Power of CUDA 12.1 with DWPose and Onnxruntime-GPU

Unlocking the Power of CUDA 12.1 with DWPose and Onnxruntime-GPU: A Simple Guide

If you're looking to harness the capabilities of DWPOSE or Onnxruntime with CUDA 12.1, follow these straightforward steps to get started.

Step-by-Step Installation Guide:

  1. Uninstall Old Version of Onnxruntime-GPU:

    • Begin by removing any existing version of Onnxruntime-GPU to avoid conflicts.

      sh

    pip uninstall onnxruntime-gpu

    Copy code

    pip uninstall onnxruntime-gpu

  2. Install PyTorch with CUDA 12.1:

    • Install the specific versions of PyTorch, Torchvision, and Torchaudio that are compatible with CUDA 12.1.

      sh

    pip install torch==2.3.0+cu121 torchvision==0.18.0+cu121 torchaudio==2.3.0+cu121 --extra-index-url https://download.pytorch.org/whl/cu121

    Copy code

    pip install torch==2.3.0+cu121 torchvision==0.18.0+cu121 torchaudio==2.3.0+cu121 --extra-index-url https://download.pytorch.org/whl/cu121

  3. Install Onnx and Onnxruntime:

    • Next, install the Onnx and Onnxruntime packages.

      sh

    pip install onnx onnxruntime

    Copy code

    pip install onnx onnxruntime

  4. Install Onnxruntime-GPU for CUDA 12.1:

    • Finally, install the Onnxruntime-GPU package compatible with CUDA 12.1 using the provided extra index URL.

      sh

    pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/

    Copy code

    pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/

Portable Version Installation:

If you need a portable setup, follow this method:

sh

python_embeded\python.exe -m pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/


Copy code

python_embeded\python.exe -m pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/


By following these steps, you'll be equipped to fully utilize the power of CUDA 12.1 with DWPOSE and Onnxruntime-GPU, ensuring optimal performance and compatibility for your projects. Happy coding!

15
0

Comments