### Setup Python Environment and Download Client Source: https://docs.lambda.ai/education/large-language-models/serving-llama-3-1-405b Creates a Python virtual environment, installs the OpenAI library, and downloads the vLLM example client script. Ensure you are on the worker node before running. ```bash python3 -m venv llama-3.1 source llama-3.1/bin/activate pip install -U openai curl -o ${SHARED_DIR}/inference_test.py 'https://raw.githubusercontent.com/vllm-project/vllm/main/examples/openai_chat_completion_client.py' ``` -------------------------------- ### Setup Python Environment and Install OpenAI Client Source: https://docs.lambda.ai/public-cloud/1-click-clusters/serving-llama-3_1-405b Create and activate a Python virtual environment, then install the OpenAI Python package. This is a prerequisite for running the chat completion client script. ```bash python3 -m venv llama-3.1 source llama-3.1/bin/activate pip install -U openai ``` -------------------------------- ### Install Lambda Stack Source: https://docs.lambda.ai/education/linux-usage/lambda-stack-and-recovery-images Installs the latest Lambda Stack by downloading and executing the installation script. Ensure you have the necessary permissions. ```bash wget -nv -O- https://lambda.ai/install-lambda-stack.sh | sh - ``` -------------------------------- ### Install uv, set up venv, and install vLLM Source: https://docs.lambda.ai/education/large-language-models/deploying-nemotron-3-nano Installs the uv package manager, creates a Python virtual environment, and installs the vLLM library with PyTorch backend support. This is a prerequisite for serving models with vLLM. ```bash curl -LsSf https://astral.sh/uv/install.sh | sh uv venv --python 3.12 --seed source .venv/bin/activate uv pip install vllm --torch-backend=auto ``` -------------------------------- ### Allocate Resources with salloc and Start Interactive Shell Source: https://docs.lambda.ai/public-cloud/1-click-clusters/managed-slurm Use salloc to request resources and start an interactive shell on the allocated node. This example requests one node with two GPUs. ```bash salloc --gpus=2 --nodes=1 --ntasks-per-node=1 srun --pty /bin/bash ``` -------------------------------- ### Install s5cmd Source: https://docs.lambda.ai/public-cloud/importing-exporting-data Download and install the s5cmd tool on your instance or node. Replace `` with the actual download link. ```bash wget ``` ```bash sudo apt install ./ ``` -------------------------------- ### Start VNC Server Source: https://docs.lambda.ai/public-cloud/on-demand/connecting-instance Starts the TightVNC server, prompting you to set a VNC access password. ```bash vncserver ``` -------------------------------- ### Create example directory Source: https://docs.lambda.ai/education/scheduling-and-orchestration/orchestrating-workloads-with-dstack Creates a new directory for dstack tutorial examples and navigates into it. This should be done in a separate terminal from the running dstack server. ```bash mkdir ~/lambda-dstack-examples && cd ~/lambda-dstack-examples ``` -------------------------------- ### Install Miniconda Source: https://docs.lambda.ai/education/programming/virtual-environments-containers Execute the downloaded Miniconda3 installer script. Follow the prompts to complete the installation, ensuring you allow initialization. ```bash sh Miniconda3-latest-Linux-x86_64.sh ``` -------------------------------- ### Install cryptsetup Source: https://docs.lambda.ai/education/linux-usage/basic-linux-commands-and-system-administration Installs the cryptsetup package, which is necessary for disk encryption. ```bash sudo apt update && sudo apt -y install cryptsetup ``` -------------------------------- ### Example: Get TensorFlow Build Info Source: https://docs.lambda.ai/education/programming/virtual-environments-containers Launches a TensorFlow NGC container and executes a Python command to retrieve detailed build information, including CUDA and cuDNN versions. ```bash docker run --gpus all -it nvcr.io/nvidia/tensorflow:23.05-tf2-py3 python -c "import tensorflow as tf ; sys_details = tf.sysconfig.get_build_info() ; print(sys_details)" ``` -------------------------------- ### Example Filesystem Usage Output Source: https://docs.lambda.ai/public-cloud/filesystems This is an example of the output from the `df -h -BG` command, illustrating how filesystem usage is displayed. ```text Filesystem 1G-blocks Used Available Use% Mounted on tmpfs 44G 1G 44G 1% /run efivarfs 1G 1G 1G 2% /sys/firmware/efi/efivars /dev/vda1 3969G 24G 3946G 1% / tmpfs 216G 1G 216G 1% /dev/shm tmpfs 1G 0G 1G 0% /run/lock /dev/vda15 1G 1G 1G 7% /boot/efi 10.12.69.11:/768f824a-2608-4200-8a6a-3d2996d10587 6792422G 0G 6792422G 0% /lambda/nfs/persistent-storage tmpfs 44G 1G 44G 1% /run/user/1000 ``` -------------------------------- ### Install curl and jq Source: https://docs.lambda.ai/education/large-language-models/kubeai-hermes-3 Installs `curl` and `jq` on your instance. These tools are necessary for interacting with the KubeAI API. ```bash sudo apt update && sudo apt -y install curl jq ``` -------------------------------- ### Install dstack with Lambda support Source: https://docs.lambda.ai/education/scheduling-and-orchestration/orchestrating-workloads-with-dstack Installs the dstack library with specific support for Lambda Cloud. Ensure python3 and pip are installed. ```bash pip install -U "dstack[lambda]" ``` -------------------------------- ### Example User Directory Creation Command Source: https://docs.lambda.ai/education/linux-usage/basic-linux-commands-and-system-administration This is an example of the command to create a user-accessible directory named 'ubuntu' within the '/mnt/encrypted-drive' mount point. ```bash sudo mkdir /mnt/encrypted-drive/ubuntu && \ sudo chown $(id -u):$(id -g) /mnt/encrypted-drive/ubuntu ``` -------------------------------- ### Install VNC Server and GNOME Desktop Source: https://docs.lambda.ai/public-cloud/on-demand/connecting-instance Installs the TightVNC server and GNOME desktop environment on your instance. Run this command after establishing an SSH connection. ```bash sudo apt update && sudo apt install -y tightvncserver gnome ``` -------------------------------- ### Example Kubernetes Node Output Source: https://docs.lambda.ai/public-cloud/1-click-clusters/managed-kubernetes/managed-kubernetes-legacy Example output when listing nodes in an MK8s cluster. ```text NAME STATUS ROLES AGE VERSION head-01 Ready control-plane,etcd,master 8d v1.32.3+rke2r1 head-02 Ready control-plane,etcd,master 8d v1.32.3+rke2r1 head-03 Ready control-plane,etcd,master 8d v1.32.3+rke2r1 worker-01 Ready 8d v1.32.3+rke2r1 worker-02 Ready 8d v1.32.3+rke2r1 ``` -------------------------------- ### Download and Install Guest Agent Source: https://docs.lambda.ai/public-cloud/guest-agent Download and execute the installation script for the Lambda Guest Agent. This command fetches the script and runs it with root privileges. ```bash curl -L https://lambdalabs-guest-agent.s3.us-west-2.amazonaws.com/scripts/install.sh | sudo bash ``` -------------------------------- ### Install System Packages Source: https://docs.lambda.ai/education/scheduling-and-orchestration/skypilot-deploy-kubernetes Installs necessary system packages including Python, pip, and utilities for managing the environment. ```bash sudo apt update && sudo apt install -y python3 python3-venv python3-pip curl netcat socat ``` -------------------------------- ### Start Ollama Server with Docker Source: https://docs.lambda.ai/education/large-language-models/deepseek-r1-ollama This command downloads the Ollama Docker image and starts the Ollama server, making it accessible via port 11434 and enabling GPU usage. ```bash sudo docker run -d --gpus=all -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama ``` -------------------------------- ### Example rsync File Copy to Remote Server Source: https://docs.lambda.ai/education/linux-usage/basic-linux-commands-and-system-administration This example demonstrates copying a local directory 'rsync_example_dir' to the home directory of the 'ubuntu' user on a remote server. ```bash $ rsync -a --progress rsync_example_dir ubuntu@146.235.208.193:~ sending incremental file list rsync_example_dir/ rsync_example_dir/EXAMPLE_FILE 0 100% 0.00kB/s 0:00:00 (xfr#1, to-chk=0/2) ``` -------------------------------- ### Install Docker and NVIDIA Container Toolkit Source: https://docs.lambda.ai/education/programming/virtual-environments-containers Installs Docker and NVIDIA Container Toolkit on Ubuntu systems. This command should be run on instances where these are not pre-installed. ```bash sudo apt -y update && sudo apt -y install docker.io nvidia-container-toolkit && \ sudo systemctl daemon-reload && \ sudo systemctl restart docker ``` -------------------------------- ### Install prerequisites on Ubuntu Source: https://docs.lambda.ai/education/scheduling-and-orchestration/orchestrating-workloads-with-dstack Installs necessary system packages on Ubuntu for dstack and related tools. This includes python3, pip, git, curl, and jq. ```bash sudo apt update && sudo apt install -y python3 python3-pip git curl jq ``` -------------------------------- ### Install socat for Port Forwarding Source: https://docs.lambda.ai/education/large-language-models/k8s-ollama-llama-3-2 Installs the socat utility, which is required for enabling port forwarding in subsequent steps of the tutorial. ```bash sudo apt -y install socat ``` -------------------------------- ### Install SkyPilot with Lambda and Kubernetes Support Source: https://docs.lambda.ai/education/scheduling-and-orchestration/skypilot-deploy-kubernetes Installs the SkyPilot package, including necessary extras for Lambda Cloud and Kubernetes integration. ```bash pip3 install skypilot-nightly[lambda,kubernetes] ``` -------------------------------- ### Install jq for Pretty-Printing JSON Source: https://docs.lambda.ai/education/large-language-models/serving-llama-3-1-docker Install the jq command-line JSON processor to format API responses. This is useful for making the output more human-readable. ```bash sudo apt update && sudo apt install -y jq ``` -------------------------------- ### Install K3s (Kubernetes) Source: https://docs.lambda.ai/education/large-language-models/k8s-ollama-llama-3-2 Installs K3s, a lightweight Kubernetes distribution, with NVIDIA GPU support enabled. Ensure you are SSH'd into your instance before running. ```bash curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE=644 sh -s - --default-runtime=nvidia ``` -------------------------------- ### Install Ollama Client Source: https://docs.lambda.ai/education/large-language-models/k8s-ollama-llama-3-2 Download and install the Ollama client for Linux AMD64 systems. This involves downloading a tarball and extracting it to the system's binary directory. ```bash curl -L https://ollama.com/download/ollama-linux-amd64.tgz -o ollama-linux-amd64.tgz sudo tar -C /usr -xzf ollama-linux-amd64.tgz ``` -------------------------------- ### Install Python Version with Full Support Source: https://docs.lambda.ai/public-cloud/on-demand/getting-started Installs a specific Python version alongside the preinstalled one, ensuring the 'venv' module is available for virtual environments. Append '-full' to the version number. ```bash sudo apt -y update && sudo apt -y install pythonVERSION-full ``` ```bash sudo apt -y update && sudo apt -y install python3.13-full ``` -------------------------------- ### Create and Navigate to Tutorial Directory Source: https://docs.lambda.ai/education/scheduling-and-orchestration/skypilot-deploy-kubernetes Sets up a dedicated directory for the SkyPilot tutorial and changes the current working directory into it. ```bash mkdir ~/skypilot-tutorial && cd ~/skypilot-tutorial ``` -------------------------------- ### Install ipmitool for Fan Control Source: https://docs.lambda.ai/hardware/workstations/getting-started Install the ipmitool utility to manage system hardware, including setting baseline fan speeds. This is required before using raw commands for fan control. ```bash sudo apt -y update && sudo apt -y install ipmitool ``` -------------------------------- ### Example PVC output Source: https://docs.lambda.ai/public-cloud/1-click-clusters/managed-kubernetes/managed-kubernetes-legacy This is an example of the output you might see when verifying PVCs using `kubectl get pvc`. It shows the PVC name, status, bound volume, capacity, access modes, and storage class. ```text NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS VOLUMEATTRIBUTESCLASS AGE huggingface-cache Bound pvc-8463f8d7-ca83-4dfd-8b21-a42edf09948b 400Gi RWX lambda-shared 45m ``` -------------------------------- ### Run Llama 3.2 3B Model with Ollama Source: https://docs.lambda.ai/education/large-language-models/k8s-ollama-llama-3-2 Execute this command in your terminal to start the Llama 3.2 3B model. Ensure Ollama is installed and configured. ```bash ollama run llama3.2:3b-instruct-fp16 ``` -------------------------------- ### Download SkyPilot Kubernetes Deployment Files Source: https://docs.lambda.ai/education/scheduling-and-orchestration/skypilot-deploy-kubernetes Fetches the example configuration and launch script for deploying a Kubernetes cluster using SkyPilot. ```bash curl -LO https://raw.githubusercontent.com/skypilot-org/skypilot/master/examples/k8s_cloud_deploy/cloud_k8s.yaml && \ curl -LO https://raw.githubusercontent.com/skypilot-org/skypilot/master/examples/k8s_cloud_deploy/launch_k8s.sh ``` -------------------------------- ### Navigate to SkyPilot Tutorial Directory Source: https://docs.lambda.ai/education/scheduling-and-orchestration/skypilot-deploy-kubernetes Change into the directory created for the SkyPilot tutorial. ```bash cd ~/skypilot-tutorial ``` -------------------------------- ### Launch Instance Request Sample Source: https://docs.lambda.ai/api/cloud Use this cURL command to launch a new instance. Ensure you replace ':' with your actual API key. The request body specifies instance configuration details. ```bash curl --request POST --url 'https://cloud.lambda.ai/api/v1/instance-operations/launch' \ --header 'accept: application/json' \ --user ':' \ --data '{ \ "region_name": "string", \ "instance_type_name": "gpu_8x_a100", \ "ssh_key_names": [ \ "my-public-key" \ ], \ "file_system_names": [ \ "my-filesystem" \ ], \ "file_system_mounts": [ \ { \ "mount_point": "/data/custom-mount-point", \ "file_system_id": "398578a2336b49079e74043f0bd2cfe8" \ } \ ], \ "hostname": "headnode1", \ "name": "My Instance", \ "image": { \ "id": "string" \ }, \ "user_data": "string", \ "tags": [ \ { \ "key": "key1", \ "value": "value1" \ } \ ], \ "firewall_rulesets": [ \ { \ "id": "c4d291f47f9d436fa39f58493ce3b50d" \ } \ ] \ }' ``` -------------------------------- ### Authenticate with curl using Basic Header Source: https://docs.lambda.ai/api/cloud Example of authenticating a GET request to list instances using `curl` with the Basic HTTP header. Replace `` with your actual API key. ```bash curl --request GET --url 'https://cloud.lambda.ai/api/v1/instances' \ --header 'accept: application/json' \ --user ':' ``` -------------------------------- ### Launch Instance API Source: https://docs.lambda.ai/api/cloud Launches a new instance with specified configurations. Requires authentication with an API key. ```APIDOC ## POST /api/v1/instance-operations/launch ### Description Launches a new instance with specified configurations. Requires authentication with an API key. ### Method POST ### Endpoint https://cloud.lambda.ai/api/v1/instance-operations/launch ### Parameters #### Request Body - **region_name** (string) - Required - The AWS region where the instance will be launched. - **instance_type_name** (string) - Required - The type of instance to launch (e.g., "gpu_8x_a100"). - **ssh_key_names** (array of string) - Required - A list of SSH key names to associate with the instance. - **file_system_names** (array of string) - Optional - A list of file system names to attach to the instance. - **file_system_mounts** (array of object) - Optional - A list of file system mount configurations. - **mount_point** (string) - Required - The mount point for the file system within the instance. - **file_system_id** (string) - Required - The ID of the file system to mount. - **hostname** (string) - Optional - The hostname for the instance. - **name** (string) - Required - The name of the instance. - **image** (object) - Required - The image to use for the instance. - **id** (string) - Required - The ID of the image. - **user_data** (string) - Optional - User data to be passed to the instance on launch. - **tags** (array of object) - Optional - Tags to apply to the instance. - **key** (string) - Required - The tag key. - **value** (string) - Required - The tag value. - **firewall_rulesets** (array of object) - Optional - Firewall rulesets to apply to the instance. - **id** (string) - Required - The ID of the firewall ruleset. ### Request Example ```json { "region_name": "string", "instance_type_name": "gpu_8x_a100", "ssh_key_names": [ "my-public-key" ], "file_system_names": [ "my-filesystem" ], "file_system_mounts": [ { "mount_point": "/data/custom-mount-point", "file_system_id": "398578a2336b49079e74043f0bd2cfe8" } ], "hostname": "headnode1", "name": "My Instance", "image": { "id": "string" }, "user_data": "string", "tags": [ { "key": "key1", "value": "value1" } ], "firewall_rulesets": [ { "id": "c4d291f47f9d436fa39f58493ce3b50d" } ] } ``` ### Response #### Success Response (200) - **instance_ids** (array of string) - A list of the unique identifiers (IDs) of the launched instances. #### Response Example ```json { "data": { "instance_ids": [ "0920582c7ff041399e34823a0be62549" ] } } ``` #### Common Error Response Codes - **400 Bad Request**: `instance-operations/launch/file-system-in-wrong-region`, `instance-operations/launch/insufficient-capacity`, `global/invalid-parameters`, `global/object-does-not-exist`, `global/quota-exceeded` - **401 Unauthorized**: `global/invalid-api-key` - **403 Forbidden**: `global/account-inactive`, `global/invalid-address` - **404 Not Found**: `global/object-does-not-exist` ``` -------------------------------- ### Install Mochi Dependencies Source: https://docs.lambda.ai/education/fine-tune-mochi-gh200 Installs the Mochi repository and its dependencies, including specific versions of moviepy, pillow, and av. Ensure pip, setuptools, wheel, and packaging are up-to-date before installation. Requires sudo for apt package installation. ```bash git clone https://github.com/genmoai/mochi.git cd mochi-tune pip install --upgrade pip setuptools wheel packaging pip install -e . --no-build-isolation pip install moviepy==1.0.3 pillow==9.5.0 av==13.1.0 sudo apt -y install bc ``` -------------------------------- ### Clone and Prepare Repositories Source: https://docs.lambda.ai/education/running-benchmark-gh200 Clone the DeepLearningExamples repository, checkout the 'lambda/benchmark' branch, and clone your forked deeplearning-benchmark repository. This sets up the necessary codebases for the benchmark. ```bash git clone https://github.com/LambdaLabsML/DeepLearningExamples.git && cd DeepLearningExamples && git checkout lambda/benchmark && cd .. && git clone https://github.com/${GIT_USERNAME}/deeplearning-benchmark.git ``` -------------------------------- ### Install Lambda Stack with cuDNN License Agreement Source: https://docs.lambda.ai/education/linux-usage/lambda-stack-and-recovery-images Installs the latest Lambda Stack on servers, explicitly agreeing to the NVIDIA cuDNN license. This is required for server installations. ```bash wget -nv -O- https://lambda.ai/install-lambda-stack.sh | I_AGREE_TO_THE_CUDNN_LICENSE=1 sh - ``` -------------------------------- ### Apply Service Account Setup Manifest Source: https://docs.lambda.ai/public-cloud/1-click-clusters/managed-kubernetes Apply the service-account-setup.yaml manifest to create a Service Account, Secret, and ClusterRoleBinding. Ensure you replace placeholders like ``, ``, and `` before applying. ```bash kubectl apply -f service-account-setup.yaml ``` -------------------------------- ### PKCS8 Public Key Format Example Source: https://docs.lambda.ai/public-cloud/on-demand/getting-started An example of a PKCS8 public key format. ```text -----BEGIN PUBLIC KEY----- ``` -------------------------------- ### Install kubectl Source: https://docs.lambda.ai/education/scheduling-and-orchestration/skypilot-deploy-kubernetes Downloads and installs the latest stable version of kubectl for managing Kubernetes clusters. ```bash curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \ sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl ``` -------------------------------- ### Mount and Run Firmware Upgrade Source: https://docs.lambda.ai/hardware/workstations/getting-started Mounts the firmware ISO, extracts the upgrade utility, and executes it. This process requires root privileges and should be performed carefully. ```bash mkdir /mnt/iso && mount -o loop Samsung_SSD_980_PRO_5B2QGXA7.iso /mnt/iso && \ mkdir fwupdate && cd fwupdate && \ gzip -dc /mnt/iso/initrd | cpio -idv --no-absolute-filenames && \ cd root/fumagician && ./fumagician ``` -------------------------------- ### PEM Public Key Format Example Source: https://docs.lambda.ai/public-cloud/on-demand/getting-started An example of a PEM public key format, such as RSA. ```text -----BEGIN RSA PUBLIC KEY----- ``` -------------------------------- ### Start vLLM Cluster for Llama 3.1 Serving Source: https://docs.lambda.ai/education/large-language-models/serving-llama-3-1-405b Downloads a helper script and executes it to set up vLLM for multi-node inference and serving the Llama 3.1 405B model on the Lambda cluster. ```bash curl -o "${SHARED_DIR}/run_cluster.sh" https://raw.githubusercontent.com/vllm-project/vllm/main/examples/run_cluster.sh sudo bash "${SHARED_DIR}/run_cluster.sh" \ vllm/vllm-openai \ "${HEAD_IP}" \ --head \ "${HF_HOME}" \ --privileged -e NCCL_IB_HCA=^mlx5_0 ``` -------------------------------- ### Download Miniconda Installer Source: https://docs.lambda.ai/education/programming/virtual-environments-containers Use this command to download the latest Miniconda3 installer script for Linux x86_64. ```bash curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh ``` -------------------------------- ### List Filesystems Response Sample Source: https://docs.lambda.ai/api/cloud This is a sample JSON response when successfully listing filesystems. It includes details for each filesystem such as ID, name, mount point, creation date, creator information, usage status, region, and bytes used. ```json { "data": [ { "id": "398578a2336b49079e74043f0bd2cfe8", "name": "my-filesystem", "mount_point": "/lambda/nfs/my-filesystem", "created": "1970-01-01T00:00:00.000Z", "created_by": { "id": "3da5a70a57a7422ea8a7203f98b2198b", "email": "me@example.com", "status": "active" }, "is_in_use": false, "region": { "name": "string", "description": "string" }, "bytes_used": 0 } ] } ``` -------------------------------- ### RFC4716 Public Key Format Example Source: https://docs.lambda.ai/public-cloud/on-demand/getting-started An example of an RFC4716 public key, often used by PuTTYgen. ```text ---- BEGIN SSH2 PUBLIC KEY ---- ``` -------------------------------- ### Add New User Account Source: https://docs.lambda.ai/public-cloud/on-demand/managing-system-environment Create a new user account on the system. This command prompts for user details and sets up a home directory. ```bash sudo adduser ``` -------------------------------- ### Install smartmontools Source: https://docs.lambda.ai/hardware/workstations/getting-started Installs the smartmontools package required to check SSD firmware. Use this command on Debian-based systems. ```bash sudo apt -y install smartmontools ``` -------------------------------- ### Filesystem Mount Point Example Source: https://docs.lambda.ai/public-cloud/on-demand Illustrates the default mount point for a filesystem attached to an instance. The filesystem is also symlinked in the 'ubuntu' user's home directory. ```bash /lambda/nfs/ ``` -------------------------------- ### Connect to Instance via SSH Source: https://docs.lambda.ai/api/cloud Establish an SSH connection to your launched instance using the generated private key. Replace `` with the public IP address of your instance. ```bash ssh -i key.pem ``` -------------------------------- ### Provider Error Example Source: https://docs.lambda.ai/api/cloud Example of an error originating from an upstream service, identified by the 'provider/' prefix in the error code. ```json { "error": { "code": "provider/internal-unavailable", "message": "Provider unavailable", "suggestion": "Try again shortly" } } ``` -------------------------------- ### Update Terminal Environment Source: https://docs.lambda.ai/public-cloud/on-demand/managing-system-environment After installation, source your .bashrc file to apply changes made by the Miniconda installer to your terminal environment. ```bash source ~/.bashrc ``` -------------------------------- ### Install Nmap on Ubuntu Source: https://docs.lambda.ai/public-cloud/on-demand/getting-started Install the Nmap utility on your local Ubuntu machine. This tool is used to scan network ports. ```bash sudo apt install -y nmap ``` -------------------------------- ### Benchmark Nemotron 3 Nano with vLLM Source: https://docs.lambda.ai/education/large-language-models/deploying-nemotron-3-nano Run this command to benchmark Nemotron 3 Nano. It downloads a dataset, configures vLLM for serving, and specifies the model and backend. Ensure you have the dataset downloaded first. ```bash wget https://huggingface.co/datasets/anon8231489123/ShareGPT_Vicuna_unfiltered/resolve/main/ShareGPT_V3_unfiltered_cleaned_split.json vllm bench serve \ --model nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16 \ --served-model-name nemotron-3-nano \ --dataset-name sharegpt \ --dataset-path ./ShareGPT_V3_unfiltered_cleaned_split.json \ --num-prompts 10 \ --trust-remote-code \ --backend openai-chat \ --endpoint /v1/chat/completions ``` -------------------------------- ### Install IPMI Tool Source: https://docs.lambda.ai/hardware/servers/getting-started Install the ipmitool package to manage IPMI functions on your server. This is a prerequisite for setting IPMI passwords. ```bash sudo apt-get install ipmitool ``` -------------------------------- ### List Available Software Modules Source: https://docs.lambda.ai/public-cloud/1-click-clusters/managed-slurm Use 'module avail' to see all software modules that can be loaded into your current environment. ```bash module avail ``` -------------------------------- ### Install FLUX.1 Model Dependencies Source: https://docs.lambda.ai/education/generative-ai/flux-prompt-to-image Install the necessary Python packages for serving the FLUX.1 model, including TensorRT support. ```bash pip install -e '.[all,tensorrt]' ``` -------------------------------- ### Delete example job Source: https://docs.lambda.ai/public-cloud/1-click-clusters/managed-kubernetes Run this command to immediately delete the example job. The job is typically configured to delete itself after completion. ```bash kubectl delete -f https://docs.lambda.ai/assets/code/multiplication-eval-deepseek-r1-distilll-qwen-7b.yaml ``` -------------------------------- ### Start vLLM Cluster on Head Node Source: https://docs.lambda.ai/public-cloud/1-click-clusters/serving-llama-3_1-405b Downloads a script to set up vLLM for multi-node inference and then runs it to start a Ray cluster for serving the Llama 3.1 405B model. It utilizes the InfiniBand fabric for optimal performance. ```bash curl -o "${SHARED_DIR}/run_cluster.sh" https://raw.githubusercontent.com/vllm-project/vllm/main/examples/run_cluster.sh sudo bash "${SHARED_DIR}/run_cluster.sh" \ vllm/vllm-openai \ "${HEAD_IP}" \ --head "${HF_HOME}" \ --privileged -e NCCL_IB_HCA=^mlx5_0 ``` -------------------------------- ### Example Nmap Scan Output Source: https://docs.lambda.ai/public-cloud/on-demand/getting-started This is an example of the output you might see after running an Nmap scan, indicating which ports are open. ```text Starting Nmap 7.80 ( https://nmap.org ) at 2023-01-11 13:22 PST Nmap scan report for 129.159.46.35 Host is up (0.041s latency). Not shown: 999 filtered ports PORT STATE SERVICE 22/tcp open ssh Nmap done: 1 IP address (1 host up) scanned in 6.42 seconds ``` -------------------------------- ### Open FortiClient VPN GUI Source: https://docs.lambda.ai/private-cloud/managed-kubernetes/getting-started Launches the FortiClient VPN graphical user interface from the terminal. Assumes FortiClient VPN is installed. ```bash forticlient gui ``` -------------------------------- ### Example Prompt for LLM Explanation Source: https://docs.lambda.ai/education/large-language-models/kubeai-hermes-3 An example prompt to be used when interacting with large language models, requesting a detailed explanation of what they are. ```text In 10,000 words or more, explain what large language models are. ``` -------------------------------- ### Create and Activate Python Virtual Environment Source: https://docs.lambda.ai/education/generative-ai/flux-prompt-to-image Create and activate a Python virtual environment for the tutorial. This isolates project dependencies. ```bash python3 -m venv .venv && source .venv/bin/activate ```