Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions e2e/python/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ def _run(sandbox: Sandbox, code: str) -> tuple[int, str, str]:

@pytest.fixture(scope="session")
def gpu_sandbox_spec() -> datamodel_pb2.SandboxSpec:
image = os.environ.get(
"OPENSHELL_E2E_GPU_IMAGE",
"ghcr.io/nvidia/openshell-community/sandboxes/nvidia-gpu:latest",
)
# Empty string defers image resolution to the server, which substitutes
# the configured default sandbox image. Set OPENSHELL_E2E_GPU_IMAGE to
# override (e.g. a locally-built or registry-mirrored image).
image = os.environ.get("OPENSHELL_E2E_GPU_IMAGE", "")
return datamodel_pb2.SandboxSpec(
gpu=True,
template=datamodel_pb2.SandboxTemplate(image=image),
Expand Down
4 changes: 4 additions & 0 deletions tasks/scripts/cluster-bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ fi

DEPLOY_CMD=(openshell gateway start --name "${CLUSTER_NAME}" --port "${GATEWAY_PORT}")

if [ "${CLUSTER_GPU:-0}" = "1" ]; then
DEPLOY_CMD+=(--gpu)
fi

if [ -n "${GATEWAY_HOST:-}" ]; then
DEPLOY_CMD+=(--gateway-host "${GATEWAY_HOST}")

Expand Down
2 changes: 1 addition & 1 deletion tasks/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ run = "uv run pytest -o python_files='test_*.py' -m 'not gpu' -n ${E2E_PARALLEL:

["e2e:python:gpu"]
description = "Run Python GPU e2e tests"
depends = ["python:proto", "cluster"]
depends = ["python:proto", "CLUSTER_GPU=1 cluster"]
env = { UV_NO_SYNC = "1", PYTHONPATH = "python" }
run = "uv run pytest -o python_files='test_*.py' -m gpu -n ${E2E_PARALLEL:-1} e2e/python"
Loading