I’m trying to use GPU to run rasa models. but the default mode of rasa is not activating the GPU part. I installed rasa via pip and I can’t overwrite the git code. Is there any parameter I should add in my config file?
I found that to prevent Rasa Open Source from blocking all of the available GPU memory, set the environment variable TF_FORCE_GPU_ALLOW_GROWTH
to True
. but I don’t know where to set that or how to do it?
I installed tensorflow-gpu as well but GPU is not working
Can you please help me?
How can I use GPU with rasa 1.9.5 installing via pip install rasa without cloning the git repository
What operating system are you using (settng enviironment variables is different for Windows or Linux)
I haven’t managed to get Tensorflow 2 to run on the GPU here yet, so I can’t offer any tips on that, but here’s how to set the environment variable in Linux:
(Not sure of your level of experience with Linux). You need to add a line a file that has your environment variables, or a line to a script that is automatically executed when you log on. This depends on which flavour of Linux you’re using. The most popular is Ubuntu, the most used in servers is Red Hat Enterprise Linux (can be called RHEL). Lots of other Linux distributions are based on these 2 main ones. (Mint is based on Ubuntu , for example. Ubuntu is itself based on Debian).
In Ubuntu and other distros based on it, you can add it to your profile in /etc/environment
. You can use nano
or vim
to edit it. Just add this line
TF_FORCE_GPU_ALLOW_GROWTH=True
to the end of the file. After saving it, type source /etc/environment
to load the new variables, and try running echo $TF_FORCE_GPU_ALLOW_GROWTH
to test it.
In RH, and distros based on it like CentOS, edit ~/.bashrc
and add this line:
export TF_FORCE_GPU_ALLOW_GROWTH=True
then close the terminal and reopen it and type echo $TF_FORCE_GPU_ALLOW_GROWTH
If you want to see all the environment variable set in your user’s session, type env
from a terminal window.
Hi,
I am experiencing GPU issue with Rasa 1.9.X too, see my post below: