zhejz / carla-roach

Roach: End-to-End Urban Driving by Imitating a Reinforcement Learning Coach. ICCV 2021.
https://zhejz.github.io/roach
Other
274 stars 50 forks source link

How to run CARLA on my 2nd GPU? #25

Closed Li-Yongcheng closed 1 year ago

Li-Yongcheng commented 1 year ago

Hi, guys!

I have 2 GPUs in my conputer and I want to train the RL model on the 2nd one. I replaced the code gpu: [0]in endless_all.yaml with gpu: [1], the final shell comand of CARLA startup is CUDA_VISIBLE_DEVICES=1 bash /media/carla/CarlaUE4.sh -fps=10 -quality-level=Low -carla-rpc-port=2000. However, I find that all CARLA servers are still running on GPU0, as shown in the picture .

I am really confused and don't know how to solve this problem. Thanks for any help! 2023-02-16 21-55-15 的屏幕截图

Li-Yongcheng commented 1 year ago

SDL_VIDEODRIVER=offscreen SDL_HINT_CUDA_DEVICE=1 ./CarlaUE4.sh -opengl, This command works for me in CARLA_0.9.10!