Thank you for the clarification, @kopyl. Apologies for the delay, @fjenett. You’re correct about Docker’s buildtime in Spaces, it doesn’t provide access to GPU hardware. Thus, any GPU-related commands shouldn’t be executed during your Dockerfile’s build step. For instance, commands like nvidia-smi
or torch.cuda.is_available()
can’t be run while building an image. @fjenett, your suggestion to build a wheel or a container on a GPU supported system and then loading it into Spaces later is excellent.
1 Like