creamy-stone-99746
04/24/2024, 6:56 PM@kubernetes CUDA and pypi
The code works on AWS Batch.
I've deployed k8s and the nvidia plugin for pods (https://github.com/NVIDIA/k8s-device-plugin/tree/main/deployments/helm/nvidia-device-plugin)
my pod can see the GPU using nvidia-smi however I'm getting the following error.
@pypi_base(
python="3.11.7",
packages={"torch": "2.2.1", "torchmetrics": ""},
extra_indices=["<https://download.pytorch.org/whl/cu118>"],
)
@kubernetes(cpu=1, memory=6000, gpu=1, shared_memory=6000)
@environment(vars={"LD_LIBRARY_PATH": "/tmp", "NVIDIA_DRIVER_CAPABILITIES": "compute,utility"})
@step
OSError: libcudart.so.11.0: cannot open shared object file: No such file or directory
I've also tried using the docker image pytorch/pytorch:2.2.1-cuda11.8-cudnn8-runtime same error.crooked-jordan-29960
04/24/2024, 7:04 PM@kubernetes(image='pytorch/pytorch:2.2.1-cuda11.8-cudnn8-runtime') without @pypi
• if you want use custom torch versions, use @conda and install compatible version of cuda toolkitcreamy-stone-99746
04/24/2024, 7:05 PMcreamy-stone-99746
04/24/2024, 7:06 PMcrooked-jordan-29960
04/24/2024, 7:21 PMlibcudart.so is, should be on LD_LIBRARY_PATH path, otherwise CUDA app cannot start because it fails to link to where you (by way of installing pytorch) installed these linux dependencies.dry-beach-38304
04/24/2024, 8:13 PMcreamy-stone-99746
04/24/2024, 9:20 PMdry-beach-38304
04/24/2024, 9:35 PMcreamy-stone-99746
04/24/2024, 9:35 PMdry-beach-38304
04/24/2024, 9:36 PMcreamy-stone-99746
04/24/2024, 9:38 PMdry-beach-38304
04/24/2024, 9:38 PMcreamy-stone-99746
04/24/2024, 9:39 PMcrooked-jordan-29960
04/24/2024, 10:03 PMcreamy-stone-99746
04/24/2024, 10:13 PMcreamy-stone-99746
04/25/2024, 5:53 PMgpu_group = {
ami_type = "AL2_x86_64_GPU" <--------- GPU has cuda
desired_capacity = 0
max_capacity = 1
min_capacity = 0
instance_types = ["g4dn.xlarge"]
update_config = {
max_unavailable_percentage = 50
}
kubelet_extra_args = "--node-labels=nvidia.com/gpu=true"
}dry-beach-38304
04/25/2024, 9:08 PM