Skip to content

Commit

Permalink
[k8s][dev] Instructions to mock GPU node (skypilot-org#3936)
Browse files Browse the repository at this point in the history
note on mocking GPU node
  • Loading branch information
romilbhardwaj authored Sep 13, 2024
1 parent 7940552 commit 8f4eef4
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/kubernetes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,24 @@ for development. To create a local development cluster, run:
sky local up
```

### Mocking a GPU node on your `sky local up` cluster

To mock a GPU node on your local cluster, you can add a label and a nvidia.com/gpu virtual resource to a node.

```bash
# Make sure `sky local up` cluster is running
kubectl label node skypilot-control-plane skypilot.co/accelerator=h100 # Or any other GPU. Be sure to use lowercase!

# Add resource. Run proxy in a terminal window:
kubectl proxy
# In a new terminal, run
curl --header "Content-Type: application/json-patch+json" \
--request PATCH \
--data '[{"op": "add", "path": "/status/capacity/nvidia.com~1gpu", "value": "8"}]' \
http://localhost:8001/api/v1/nodes/skypilot-control-plane/status
```


## Running a GKE cluster
1. Create a GKE cluster with at least 1 node. We recommend creating nodes with at least 4 vCPUs.
* Note - only GKE standard clusters are supported. GKE autopilot clusters are not supported.
Expand Down

0 comments on commit 8f4eef4

Please sign in to comment.