How to run Tensorflow on CPU October 21, 2022 by Tarik You can also set the environment variable to CUDA_VISIBLE_DEVICES="" without having to modify the source code.