Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Nemo Curator K8s example #40

Merged
merged 7 commits into from
Apr 23, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
black formatting
Signed-off-by: Terry Kong <terryk@nvidia.com>
  • Loading branch information
terrykong committed Apr 23, 2024
commit df51fd806e38cc38f48d05868dd8dacced3fce9e
13 changes: 9 additions & 4 deletions examples/k8s/create_dask_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def create_cluster(
scheduler_spec["volumes"] = obj_vols
for ctr in scheduler_spec["containers"]:
ctr["volumeMounts"] = obj_vol_mounts

worker_spec["volumes"] = obj_vols
for ctr in worker_spec["containers"]:
ctr["volumeMounts"] = obj_vol_mounts
Expand All @@ -61,8 +61,11 @@ def create_cluster(
if n_cpus_per_worker:
ctr["resources"]["limits"]["cpu"] = str(n_cpus_per_worker)

cluster = KubeCluster(custom_cluster_spec=custom_cluster_spec, shutdown_on_close=False)
print(f'{cluster = }')
cluster = KubeCluster(
custom_cluster_spec=custom_cluster_spec, shutdown_on_close=False
)
print(f"{cluster = }")


if __name__ == "__main__":

Expand All @@ -81,7 +84,9 @@ def parse_pvcs(specs: str) -> dict[str, str]:
parser.add_argument("-w", "--n_workers", type=int, default=2)
parser.add_argument("-g", "--n_gpus_per_worker", type=int, default=None)
parser.add_argument("-c", "--n_cpus_per_worker", type=int, default=None)
parser.add_argument("-i", "--image", type=str, default="nvcr.io/nvidia/nemo:24.01.framework")
parser.add_argument(
"-i", "--image", type=str, default="nvcr.io/nvidia/nemo:24.01.framework"
)
parser.add_argument("-s", "--image_pull_secret", type=str, default=None)
parser.add_argument(
"-p",
Expand Down