Files
coolify/resources/views/components/server/gpu-list.blade.php
T
Andras BacsaiandClaude Opus 5.5 ad6e929a93 feat(gpu): fix GPU compose settings and show detected server GPUs
- Build a valid compose device request (device_ids list, options mapping, blank driver)
- Map --gpus N to count and drop --gpus when GPU settings are enabled
- Validate only changed GPU values so stored legacy values keep working
- Detect NVIDIA GPUs and the container toolkit with the server details
- Show detected GPUs with a refresh button in the application GPU section

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 15:00:31 +02:00

29 lines
1.3 KiB
PHP

@props(['server'])
@php($gpus = $server->detectedGpus())
<div {{ $attributes->merge(['class' => 'text-[12px] leading-5 text-neutral-600 dark:text-fg-dim']) }}>
@if ($gpus === null)
<p>Not checked yet. Refresh to find GPUs.</p>
@elseif ($gpus === [])
<p>No NVIDIA GPU found (<span class="font-mono">nvidia-smi</span> is not installed or shows no GPU).</p>
@else
<ul>
@foreach ($gpus as $gpu)
<li wire:key="server-{{ $server->id }}-gpu-{{ $gpu['uuid'] }}">
<span class="font-mono font-medium text-neutral-950 dark:text-fg">{{ $gpu['index'] }}</span>
· {{ $gpu['name'] }} · {{ round($gpu['memory_mb'] / 1024, 1) }} GB ·
<span class="font-mono">{{ $gpu['uuid'] }}</span>
</li>
@endforeach
</ul>
@unless (data_get($server->server_metadata, 'nvidia_container_toolkit'))
<p class="mt-1 text-warning-900 dark:text-warning">
NVIDIA Container Toolkit not found. Containers cannot use these GPUs until you
<a href="https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html"
class="underline" target="_blank">install it</a> and restart Docker.
</p>
@endunless
@endif
</div>