Hi everyone. I installed Rasa x full from belowing link via docker compose. [Docker Compose Installation](https://Rasa x docker compose)
I insert approximately 100-150 nlu,response,story data. When i train model it takes 5-6 min. It use CPU. My machine has GPU. I installed tensorflow and nvidia drivers from here. https://www.tensorflow.org/install/gpu
But when i train my model it still use cpu. I run nvidia-smi command it says you have gpu driver s but no runnign processes found.
After this i tried belowing operations;
sudo mkdir -p /etc/systemd/system/docker.service.d sudo tee /etc/systemd/system/docker.service.d/override.conf <<EOF [Service] ExecStart= ExecStart=/usr/bin/dockerd --host=fd:// --add-runtime=nvidia=/usr/bin/nvidia-container-runtime EOF sudo systemctl daemon-reload sudo systemctl restart docker
nano /etc/docker/daemon.json
{ “default-runtime”: “nvidia”, “runtimes”: { “nvidia”: { “path”: “/usr/bin/nvidia-container-runtime”, “runtimeArgs”: [] } } } sudo pkill -SIGHUP dockerd systemctl daemon-reload systemctl restart docker
But it still not use.
I changed my docker-compose file like;
in services area insert nvsmi test service; nvsmi: image: ubuntu:18.04 environment: NVIDIA_VISIBLE_DEVICES: all NVIDIA_DRIVER_CAPABILITIES: all command: nvidia-smi
I run new compose file then nvsmi container return gpu driver list(as expected) I added belowing value in environment area to x-rasa-services: &default-rasa-service and rasa-production and rasa-worker NVIDIA_VISIBLE_DEVICES: all NVIDIA_DRIVER_CAPABILITIES: all
But it still not use.
I tried belowing code in python it uses my GPU import tensorflow as tf tf.debugging.set_log_device_placement(True) a = tf.constant([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]]) b = tf.constant([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]]) c = tf.matmul(a, b)
print©
How can i use my gpu in rasa. Please help me?
My OS version: Ubuntu 18.04 rasa 2.1.2 full version docker-compose version: 1.26.0 tensorflow: 2.4.0 python version: 2.7.17, 3, 3.6(multiple version) NVIDIA-SMI 460.27.04 Driver Version: 460.27.04 CUDA Version: 11.2
Thanks.