ApolloAuto / apollo

An open autonomous driving platform
Apache License 2.0
25.01k stars 9.67k forks source link

how to specify GPU when using Apollo docker #14788

Open btcreater opened 1 year ago

btcreater commented 1 year ago

System information

Hi, There are more than One GPUs(from 0-3, 4 GPUs) on my remote server. And the Apollo docker are installed on my server. My question is how to specify the GPU number of the Apollo docker using. At present,when I use script "dev_start.sh",the docker use GPU 0 default. I want to change Apollo to start docker using GPU 3.

Any advice would be appreciate. Thanks!

daohu527 commented 1 year ago

You can set the gpu_id in the config file, so this will depend on which mode you use.

Of course, the ideal way is to automatically arrange according to the dag file. For now we just orchestrated cpu resources, not gpu, but this could be a really nice feature

btcreater commented 1 year ago

Thanks for your reply. Apologies for being a newcomer, could you please show how to set gpu_id in which config file? after add --gpu "device=3" in dev_start.sh file, there seems no effect. So which config file should i modify?

Now my goal is to run "mainboard -d perception/production/dag/dag_streaming_perception.dag" to start perception module, but log shows there exists no enough memory in gpu_0 . So i want to start Apollo docker and run docker on gpu_3.

daohu527 commented 1 year ago

Currently the distribution of gpu_ids is scattered, you can try to modify gpu_id in

/home/zero/01opencode/apollo/modules/perception/pipeline/config/camera_detection_pipeline.pb.txt

I will add lidar modify later