diff --git a/docs/build.sh b/docs/build.sh index 63f060df35c..87dd2dbf500 100755 --- a/docs/build.sh +++ b/docs/build.sh @@ -1,7 +1,14 @@ #!/bin/bash rm -rf build docs -script -q /tmp/build_docs.txt bash -c "make html" + +# MacOS and GNU `script` have different usages +if [ "$(uname -s)" = "Linux" ]; then + script -q /tmp/build_docs.txt -c "make html" +else + # Assume MacOS (uname -s = Darwin) + script -q /tmp/build_docs.txt bash -c "make html" +fi # Check if the output contains "ERROR:" or "WARNING:" if grep -q -E "ERROR:|WARNING:" /tmp/build_docs.txt; then diff --git a/docs/source/reference/kubernetes/kubernetes-deployment.rst b/docs/source/reference/kubernetes/kubernetes-deployment.rst index d3891b3df51..98936d7b909 100644 --- a/docs/source/reference/kubernetes/kubernetes-deployment.rst +++ b/docs/source/reference/kubernetes/kubernetes-deployment.rst @@ -142,11 +142,11 @@ Deploying on Google Cloud GKE $ sky check -5. [If using GPUs] Check available GPUs in the kubernetes cluster with :code:`sky show-gpus --cloud kubernetes` +5. [If using GPUs] Check available GPUs in the kubernetes cluster with :code:`sky show-gpus --cloud k8s` .. code-block:: console - $ sky show-gpus --cloud kubernetes + $ sky show-gpus --cloud k8s GPU REQUESTABLE_QTY_PER_NODE TOTAL_GPUS TOTAL_FREE_GPUS L4 1, 2, 4 8 6 A100 1, 2 4 2 @@ -197,11 +197,11 @@ Deploying on Amazon EKS $ sky check -5. [If using GPUs] Check available GPUs in the kubernetes cluster with :code:`sky show-gpus --cloud kubernetes` +5. [If using GPUs] Check available GPUs in the kubernetes cluster with :code:`sky show-gpus --cloud k8s` .. code-block:: console - $ sky show-gpus --cloud kubernetes + $ sky show-gpus --cloud k8s GPU REQUESTABLE_QTY_PER_NODE TOTAL_GPUS TOTAL_FREE_GPUS A100 1, 2 4 2 @@ -299,4 +299,4 @@ Deploying on cloud VMs You can also spin up on-demand cloud VMs and deploy Kubernetes on them. We provide scripts to take care of provisioning VMs, installing Kubernetes, setting up GPU support and configuring your local kubeconfig. -Refer to our `Deploying Kubernetes on VMs guide `_ for more details. \ No newline at end of file +Refer to our `Deploying Kubernetes on VMs guide `_ for more details. diff --git a/docs/source/reference/kubernetes/kubernetes-getting-started.rst b/docs/source/reference/kubernetes/kubernetes-getting-started.rst index 9d46acf13c0..99d8f56cd34 100644 --- a/docs/source/reference/kubernetes/kubernetes-getting-started.rst +++ b/docs/source/reference/kubernetes/kubernetes-getting-started.rst @@ -150,11 +150,11 @@ Unlike :code:`sky status` which lists only the SkyPilot resources launched by th bob 2 - failjob 1x[CPU:1+] 1 day ago 54s 9s 0 FAILED bob 1 - shortjob 1x[CPU:1+] 2 days ago 1h 1m 19s 1h 16s 0 SUCCEEDED -You can also inspect the real-time GPU usage on the cluster with :code:`sky show-gpus --cloud kubernetes`. +You can also inspect the real-time GPU usage on the cluster with :code:`sky show-gpus --cloud k8s`. .. code-block:: console - $ sky show-gpus --cloud kubernetes + $ sky show-gpus --cloud k8s Kubernetes GPUs GPU REQUESTABLE_QTY_PER_NODE TOTAL_GPUS TOTAL_FREE_GPUS L4 1, 2, 4 12 12 diff --git a/docs/source/reference/kubernetes/kubernetes-setup.rst b/docs/source/reference/kubernetes/kubernetes-setup.rst index 3621d1b5338..dcc870fe145 100644 --- a/docs/source/reference/kubernetes/kubernetes-setup.rst +++ b/docs/source/reference/kubernetes/kubernetes-setup.rst @@ -260,7 +260,7 @@ You can also check the GPUs available on your nodes by running: .. code-block:: console - $ sky show-gpus --cloud kubernetes + $ sky show-gpus --cloud k8s Kubernetes GPUs GPU REQUESTABLE_QTY_PER_NODE TOTAL_GPUS TOTAL_FREE_GPUS L4 1, 2, 4 12 12 diff --git a/docs/source/reference/kubernetes/kubernetes-troubleshooting.rst b/docs/source/reference/kubernetes/kubernetes-troubleshooting.rst index 258c3e9eb55..3abb8e42076 100644 --- a/docs/source/reference/kubernetes/kubernetes-troubleshooting.rst +++ b/docs/source/reference/kubernetes/kubernetes-troubleshooting.rst @@ -87,7 +87,7 @@ Next, try running a simple hello world task to verify that SkyPilot can launch t .. code-block:: bash - $ sky launch -y -c mycluster --cloud kubernetes -- "echo hello world" + $ sky launch -y -c mycluster --cloud k8s -- "echo hello world" # Task should run and print "hello world" to the console # Once you have verified that the task runs, you can delete it @@ -174,7 +174,7 @@ Run :code:`sky check` to verify that SkyPilot can see your GPUs. # Should show `Kubernetes: Enabled` and should not print any warnings about GPU support. # List the available GPUs in your cluster - $ sky show-gpus --cloud kubernetes + $ sky show-gpus --cloud k8s Step B4 - Try launching a dummy GPU task ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -184,7 +184,7 @@ Next, try running a simple GPU task to verify that SkyPilot can launch GPU tasks .. code-block:: bash # Replace the GPU type from the sky show-gpus output in the task launch command - $ sky launch -y -c mygpucluster --cloud kubernetes --gpu :1 -- "nvidia-smi" + $ sky launch -y -c mygpucluster --cloud k8s --gpu :1 -- "nvidia-smi" # Task should run and print the nvidia-smi output to the console @@ -298,7 +298,7 @@ Next, try running a simple task with a service to verify that SkyPilot can launc .. code-block:: bash - $ sky launch -y -c myserver --cloud kubernetes --ports 8080 -- "python -m http.server 8080" + $ sky launch -y -c myserver --cloud k8s --ports 8080 -- "python -m http.server 8080" # Obtain the endpoint of the service $ sky status --endpoint 8080 myserver @@ -307,4 +307,4 @@ Next, try running a simple task with a service to verify that SkyPilot can launc $ curl If you are unable to get the endpoint from SkyPilot, -consider running :code:`kubectl describe services` or :code:`kubectl describe ingress` to debug it. \ No newline at end of file +consider running :code:`kubectl describe services` or :code:`kubectl describe ingress` to debug it. diff --git a/docs/source/reservations/existing-machines.rst b/docs/source/reservations/existing-machines.rst index d8d3fb81e67..10962ecd639 100644 --- a/docs/source/reservations/existing-machines.rst +++ b/docs/source/reservations/existing-machines.rst @@ -106,7 +106,7 @@ Deploying SkyPilot .. code-block:: console - $ sky show-gpus --cloud kubernetes + $ sky show-gpus --cloud k8s Kubernetes GPUs GPU REQUESTABLE_QTY_PER_NODE TOTAL_GPUS TOTAL_FREE_GPUS L4 1, 2, 4 12 12 @@ -121,7 +121,7 @@ Deploying SkyPilot my-cluster-4 H100 8 8 my-cluster-5 H100 8 8 - $ sky launch --cloud kubernetes --gpus H100:1 -- nvidia-smi + $ sky launch --cloud k8s --gpus H100:1 -- nvidia-smi .. tip:: diff --git a/sky/cli.py b/sky/cli.py index 6e0587cc117..640030cd508 100644 --- a/sky/cli.py +++ b/sky/cli.py @@ -3025,9 +3025,9 @@ def show_gpus( and spot instances. There may be multiple regions with the same lowest price. - If ``--cloud kubernetes`` is specified, it will show the maximum quantities - of the GPU available on a single node and the real-time availability of - the GPU across all nodes in the Kubernetes cluster. + If ``--cloud kubernetes`` or ``--cloud k8s`` is specified, it will show the + maximum quantities of the GPU available on a single node and the real-time + availability of the GPU across all nodes in the Kubernetes cluster. Definitions of certain fields: