triton-inference-server / pytriton

PyTriton is a Flask/FastAPI-like interface that simplifies Triton's deployment in Python environments.
https://triton-inference-server.github.io/pytriton/
Apache License 2.0
687 stars 45 forks source link

Support for ubuntu20.04 #36

Closed lfxx closed 8 months ago

lfxx commented 9 months ago

Is your feature request related to a problem? Please describe. Now pytriton must be used on Ubuntu 22.04,this is really strict since most of people are using version<22.04.i know it is because Triton Inference Server is built on 22.04.I wonder if we can publish a lts version stick on 20.04.

Describe the solution you'd like OS complatible version of pytriton .If people need some new feature from Triton Inference Server,they can use pytriton built on 22.04 otherwise they can use pytriton built on 20.04 which includes bug fixes and some features just for pytriton not from Triton Inference Server

Describe alternatives you've considered if we can not do this officially,can i build pytriton from source?

lfxx commented 8 months ago

anyone here?

piotrm-nvidia commented 8 months ago

Thank you for your interest in our project and your feature request. I appreciate your feedback and I will try to help you with your problem.

As you correctly pointed out, PyTriton requires Ubuntu 22.04 as the host operating system because it depends on the Triton Inference Server binaries that are built on Ubuntu 22.04. However, there are some possible solutions for users of Ubuntu 20.04 who want to use PyTriton.

I hope this helps you to use PyTriton on Ubuntu 20.04. Please let me know if you have any questions or issues with this process. I'm happy to assist you further.

lfxx commented 8 months ago

Thank you for your interest in our project and your feature request. I appreciate your feedback and I will try to help you with your problem.

As you correctly pointed out, PyTriton requires Ubuntu 22.04 as the host operating system because it depends on the Triton Inference Server binaries that are built on Ubuntu 22.04. However, there are some possible solutions for users of Ubuntu 20.04 who want to use PyTriton.

  • If you don't need the latest features of PyTriton and Triton Inference Server, you can install an older version of PyTriton that works with Ubuntu 20.04. The command to do this is:

    pip install nvidia-pytriton==0.2.5

    This version of PyTriton is compatible with Triton Inference Server v2.33.0, which is available as a docker container based on Ubuntu 20.04.

  • If you need the new features of PyTriton and Triton Inference Server, such as decoupled mode support, then you need Triton version v2.36.0 or higher. In this case, you have to build your own version of PyTriton from source, using a custom-built docker container that has Triton Inference Server binaries for Ubuntu 20.04. To do this, you need to follow these steps:

    1. Build Triton Inference Server for v2.36.0 Ubuntu 20.04 following the instructions in the Triton's documentation. You can use your local machine or a cloud instance for this task.
    2. Test your custom-built Triton Inference Server to make sure it works as expected.
    3. Create a docker image with your custom-built Triton Inference Server binaries and tag it with a name of your choice.
    4. Clone the PyTriton repository and modify the Makefile to use your docker image name instead of the default one:
      # Default container
      # TRITONSERVER_IMAGE_NAME = nvcr.io/nvidia/tritonserver:$(TRITONSERVER_IMAGE_VERSION)-pyt-python-py3
      TRITONSERVER_IMAGE_NAME = <your docker image name>
    5. Run make dist to build the PyTriton wheel file from source for Ubuntu 20.04 (see: building).
    6. Install the PyTriton wheel file.

I hope this helps you to use PyTriton on Ubuntu 20.04. Please let me know if you have any questions or issues with this process. I'm happy to assist you further.

Thanks for your kindly reply.I will try it in the later.