1
Fork 0

chore: configure devcontainer

This commit is contained in:
Tibo De Peuter 2026-03-18 17:03:09 +01:00
parent 1f64f8a176
commit fc9fd5a6c3
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
6 changed files with 136 additions and 3 deletions

View file

@ -0,0 +1,15 @@
#!/bin/bash
set -e
# Detect if a GPU is available via nvidia-smi.
# This works for Linux hosts and Windows (WSL2) with NVIDIA Container Toolkit.
# On Mac (Apple Silicon) or systems without NVIDIA GPUs, this will skip the 'cuda' extra.
if command -v nvidia-smi &> /dev/null && nvidia-smi &> /dev/null; then
echo "GPU detected. Syncing with 'cuda' extra..."
uv sync --frozen --extra cuda
else
echo "No GPU detected or nvidia-smi failed. Syncing without 'cuda' extra..."
uv sync --frozen
fi
echo "Environment synced successfully."