Add nccl_launch_mode to bachrc or profile answered my own question consider it solved

Is this the best way to use the nccl launch mode exporting it using the .bashrc in Ubuntu? If not what is the best method.
How to set: os.environ[‘NCCL_LAUNCH_MODE’] = ‘1’ this will work for any os environment variable that needs to be set.

hi @hskramer , how did you answer this for yourself? this can help other members of the community if they have similar questions.

Yes, I did some research and found that you can set any environment variable you may need such as the nccl by using os.environ[‘NCCL_LAUNCH_MODE’]= ‘1’. I already edited my post to show this and noted that it can be used to set any environment variable.