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

22
tests/test_jax_init.py Normal file
View file

@ -0,0 +1,22 @@
import jax
import sys
def verify_jax():
print(f"Python version: {sys.version}")
print(f"JAX version: {jax.__version__}")
devices = jax.devices()
print(f"Available devices: {devices}")
gpu_found = any(d.device_kind == 'gpu' for d in devices)
if gpu_found:
print("SUCCESS: GPU detected!")
else:
print("INFO: Only CPU detected (expected if not in GPU-enabled environment/container).")
if __name__ == "__main__":
try:
verify_jax()
except Exception as e:
print(f"ERROR during JAX initialization: {e}")
sys.exit(1)