@gbenel posted a new topic, subject "Xavier NX multiple container demo stuck launching TRTIS". It read:

   Hi,
    
    I am trying to launch the multi-container demo for the Xavier NX.
    
    It launches the DeepStream Container with the person detector and tracker very quickly.
    
    It then gets stuck launching the TRTIS server.
    
    I would appreciate any help!
    
    Thanks.

To which @gbenel replied

    The BERT demo eventually launched but the Pose and Gaze containers did not.
    
    Got this error:  
    Error of failed requests: BadWindow (invalid window parameter)  
    Major opcode of failed request: 15 (X_QueryTree)  
    Resource id in failed request: 0xe12dd0  
    Serial number of failed request: 202  
    Current serial number in output stream: 202

After which, @gbenel added

    running each script individually works (run_peopleDetect.sh, run_pose.sh, etc) - when I try to run all 4 together (not through the containers but by starting each seperately) I run out of memory.

After which, @AastaLLL added

    Hi,
    [code] 
        Error of failed requests: BadWindow (invalid window parameter)
        
    [/code]
    
    This issue is related to the X11 sever.  
    Have you connected a display device to the XavierNX?
    
    Thanks.

Then @gbenel said

    yes, I have.

So @AastaLLL replied

    Hi,
    
    Have you exported the display device to the docker?
    [code] 
        $ xhost +
        $ sudo docker run ... -e DISPLAY=$DISPLAY ...
        
    [/code]
    
    Thanks.

@gbenel replied

    I am launching the script file that is part of the demo, and looking through it, it does activate the display.  
    For instance, in run_pose.sh, it has  
    DISPLAY=$DISPLAY in the sudo docker run line.
    
    Interestingly, the following line in the run_demo.sh is commented out:  
    #export DISPLAY=:0

To which @AastaLLL replied

    Hi,
    
    Sorry for the late update.  
    Do you fix this issue yet?  
    If not, would you mind to try this command within the container first?
    [code] 
        $ export DISPLAY=:1
        
    [/code]
    
    Thanks.

After which, @gbenel added

    tried it, when I run the demo,  
    `xhost: unable to open display ":1"`

@gbenel replied

    setting  
    `$ export DISPLAY=:0`
    
    lets it run, but only speech and person counting demo work, the other two never load.

Then @AastaLLL said

    Hi,
    
    Thanks.  
    Let us give it a try and update more information with you later.

After which, @AastaLLL added

    Hi,
    
    Sorry for the late update.  
    This comes from the incompatible TensorRT serialized engine file.
    
    Please noticed that these docker image is built on the JetPack 4.4 **DP** (TRT-7.1. **0** ).  
    To run it on the JetPack 4.4 **GA** (TRT-7.1. **3** ), please recompile the TensorRT engine first.
    [code] 
        $ sudo docker run -it --rm --net=host --runtime nvidia  -e DISPLAY=$DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix nvcr.io/nvidia/jets
        
    [/code]
    [code] 
        $ python3
        >>> import torch
        >>> import torch2trt
        >>> import trt_pose.models
        >>> import tensorrt as trt
        >>> MODEL = trt_pose.models.densenet121_baseline_att
        >>> model = MODEL(18, 42).cuda().eval()
        >>> model.load_state_dict(torch.load('/pose/generated/densenet121_baseline_att.pth'))
        >>> data = torch.randn((1, 3, 224, 224)).cuda().float()
        >>> model_trt = torch2trt.torch2trt(model, [data], fp16_mode=True, max_workspace_size=1 << 25, log_level=trt.Logger.VERBOSE)
        >>> torch.save(model_trt.state_dict(), '/pose/generated/densenet121_baseline_att_trt.pth')
        >>> exit()
        
    [/code]
    [code] 
        $ python3 run_pose_pipeline.py /videos/pose_video.mp4
        
    [/code]
    
    We can run the sample without issue after regenerating the TensorRT engine.  
    Thanks.

So @zhidong.su (Zhidong Su) replied

    I got the same issue, can you tell me how do you recompile the TensorRT engine? thanh you !

So @kayccc replied

    Hi zhidong.sum
    
    Please help to open a new topic for your issue. Thanks

To which @nadeemm replied

    


{'source': 'discourse', 'url': 'https://forums.developer.nvidia.com/t/xavier-nx-multiple-container-demo-stuck-launching-trtis/129157', 'title': 'Xavier NX multiple container demo stuck launching TRTIS', 'views': 900, 'has_accepted_answer': True, 'word_count': 486, 'like_count': 0, 'reply_count': 10, 'participant_count': 4, 'posts': 15, 'tags': 'jetson-inference', 'author': '@gbenel', 'participants': '@gbenel, @AastaLLL, @zhidong.su (Zhidong Su), @kayccc, @nadeemm', 'image_url': [None], 'created_at': '2020-06-22T22:54:09.417Z', 'last_posted_at': '2021-10-18T18:43:09.104Z'}