Darknet2onnx
Deepstream can convert darknet .weights files automatically. See the Deepstream YOLO example config files.
Converting the .weights manually
After the training use https://github.com/pharath/pytorch-YOLOv4.git to convert the darknet .weights file to an .onnx file.
Then, this .onnx file will be converted to a TensorRT .engine using the Deepstream framework. Deepstream will do the conversion automatically, i.e. you only have to specify the location of your .onnx model file in the model config file.