Rllib GPU test torch

I am using a server that is for some reason stuck at Cuda 11.2 and cannot be upgraded with python version 3.8.5. I installed torch corresponding to that version and confirmed that it is able to see the GPU using torch.cuda.get_device_name(0) which returned Tesla V100. Next I did an install of ray[rllib] latest version and tried running the following code

import ray
from ray.rllib.algorithms.ppo import PPOConfig

ray.init()

config = PPOConfig()  
config = config.training(gamma=0.9, lr=0.01, kl_coeff=0.3)  
config = config.resources(num_cpus=1, num_gpus=1)
config.framework("torch")
# config = config.rollouts(num_rollout_workers=4)  
print(config.to_dict())  
# Build a Algorithm object from the config and run 1 training iteration.
algo = config.build(env="CartPole-v1")
print("Starting Training")
algo.train()

But it gets stuck with the message

2023-08-09 15:40:59,001 WARNING deprecation.py:50 -- DeprecationWarning: `DirectStepOptimizer` has been deprecated. This will raise an error in the fu
ture!
2023-08-09 15:42:07,450 INFO worker.py:1612 -- Started a local Ray instance. View the dashboard at ?[1m?[32mhttp://127.0.0.1:8265 ?[39m?[22m

I checked the dashboard and it is empty

Kindly assist…