Spaces - Running CUDA 11.8 / PyTorch 2 in spaces

Hi there. From the documentations Using GPU Spaces (huggingface.co) I read that HF spaces are using cuda 11.3, which is not supported by PyTorch 2.0. I want to use new features like torch.compile and efficient attention operations in PyTorch 2.0, what should I do?

hi @eliphatfs ,

You can use our Docker SDK and customize the Docker base image. Here is an example using Gradio + CUDA/Nvidia 12.1.1 base image. You can duplicate the Space

Dockerfile · SpacesExamples/Gradio-Docker-Template-nvidia-cuda at main

1 Like