You can enable hardware acceleration on Rasa by using a Docker container.
Make sure you have the following installed on your machine:
Remember to reboot the machine when all the requirements are installed.
If you are not sure if you have all the requirements installed, you can check by running:
You should see information about your NVIDIA GPU devices if GPU-enabled Docker is configured on your machine.
Image release tag format
GPU image releases are tagged using the following format:
|The latest release or a specified version of Rasa GPU image.
|The latest release or a specified version of Rasa GPU image with mitie.
|The latest release or a specified version of Rasa GPU image with SpaCy in English.
|The latest release or a specified version of Rasa GPU image with SpaCy in German.
You can specify the version of the Rasa GPU image, for example,
For all versions of
rasa >= 3.0.0, GPU images are released and ready for use.
If you are using an older version of rasa, please reach out to your point of contact at Rasa.
Start the Docker container with GPU acceleration
To enable GPU usage, add the flag
--gpu all, to your
docker run command. In the following example, arguments inside square brackets
 are optional:
Here is a quick explanation of the arguments used in the example command:
-ituse interactive terminal
--rmclean up the anonymous volumes associated with the container when the container is removed
-v $PWD:/tmpmount your current working directory - this should be the root of your Rasa project
tagspecifies which image tag to use - remember to use a tag ending with
rasa commandarguments to pass to the rasa command line interface
Please refer to the official
docker run docs for more details.
If you see the following error when using GPU resources:
Install NVIDIA Container Toolkit and reboot the machine.