diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1840e8b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,48 @@ +name: CI + +on: + push: + branches: + - main + - "pull-request/[0-9]+" + workflow_dispatch: + +jobs: + test: + name: Test Environment + runs-on: linux-amd64-gpu-rtxpro6000-latest-1 + timeout-minutes: 30 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Test Docker + run: | + docker --version + docker run --rm hello-world + + - name: Check GPU Hardware + run: | + echo "=== Host GPU Information ===" + lspci | grep -i nvidia || echo "No NVIDIA GPU found via lspci" + nvidia-smi || echo "nvidia-smi not available on host" + + - name: Test CUDA Image + run: | + docker pull nvidia/cuda:13.0.2-base-ubuntu24.04 + docker run --rm nvidia/cuda:13.0.2-base-ubuntu24.04 bash -c " + echo 'CUDA container test successful' + cat /etc/os-release + which nvcc || echo 'nvcc not in PATH' + " + + - name: Test CUDA Image with GPU Access + run: | + echo "=== Testing GPU access in container ===" + docker run --rm --gpus all nvidia/cuda:13.0.2-base-ubuntu24.04 bash -c " + echo 'Container with GPU access:' + nvidia-smi || echo 'nvidia-smi not available in container' + echo 'CUDA Runtime version:' + cat /usr/local/cuda/version.txt 2>/dev/null || echo 'CUDA version file not found' + " || echo "GPU access failed - may not be available on this runner"