Update Cudnn and tensorRT


I would like to know the best way to update cudnn and tensorRT without updating cuda to 10.0
I am currently using cudnn and tensorRT 4.0.1 and cuda 9.0.
I have installed both with deb file.

i would like to use cudnn 7.4.2 and tensorRT 5.0.4.

Thank you in advance.