Skip to navigation

Connect DGX Spark

View as Markdown

Connect your NVIDIA DGX Spark using Brev Connect in the console, then use the Brev CLI for SSH access, team sharing, and port forwarding.

Prerequisites

  • An NVIDIA DGX Spark running Linux with systemd
  • A Brev account (sign up at brev.nvidia.com)
  • An Owner or Admin role in the target organization for console registration
  • sudo access on the DGX Spark
  • An SSH server running on the DGX Spark (default port: 22)

Connect Your DGX Spark

Run the registration and SSH setup commands on your DGX Spark. You can open the Brev Console from another computer.

1

Name your compute in Brev Connect

Open the Brev Console and select the organization that should own the machine. On the compute page, select Connect a local device (or Register Compute in the older layout) to open Brev Connect.

Enter a compute name such as my-dgx-spark.

2

Choose a Brev Personal API key

Create a new Personal API key or supply an existing, unexpired Read & Write key for the selected organization. Save the key for the SSH setup commands below; a newly created key is only shown once.

See API Keys for details.

3

Run the generated command on your DGX Spark

Copy the command from the dialog and run it in a terminal on your DGX Spark. It installs the Brev CLI and runs brev register --name ... --api-key ..., using the organization associated with the key. No separate browser login is needed for registration.

The command contains your API key. Keep it private.

Make the installed CLI available to subsequent commands in this terminal:

export PATH="$HOME/.local/bin:$PATH"
1

Install the Brev CLI

Install the Brev CLI on your DGX Spark:

bash -c "$(curl -fsSL https://raw.githubusercontent.com/brevdev/brev-cli/main/bin/install-latest.sh)"
export PATH="$HOME/.local/bin:$PATH"
2

Log in to Brev

Authenticate with your Brev account:

brev login
3

Connect your DGX Spark

Start interactive registration:

brev register

Enter a name such as my-dgx-spark, select your organization, and confirm. To supply the name and organization directly, use brev register --name my-dgx-spark --org my-org, replacing my-org with your organization name. Complete any login or sudo password prompts.

Registration installs NetBird for secure connectivity, detects your hardware, and makes the machine visible in your organization. It requires sudo access and installs NetBird as a systemd service. Registration does not enable SSH or grant anyone access.

Enable SSH Access

Run these commands on your DGX Spark, replacing <your-brev-api-key> with the key used during registration. Passing the key to brev register does not save it for later commands.

If you used the manual CLI registration option without an API key, omit --api-key from the commands below and complete any login prompts.

1

Enable SSH access

Enable SSH so you and your team can connect:

brev enable-ssh --api-key "<your-brev-api-key>"

When prompted, select the Linux user and enter the SSH port (default is 22). This configures Brev SSH access for that Linux user; it does not install or start the SSH server. Grant access to your Brev user next.

2

Grant yourself SSH access

brev grant-ssh --api-key "<your-brev-api-key>"

Select your machine, SSH port, and your own Brev user. Use the same Linux user you selected for brev enable-ssh, then confirm. The API key determines the organization; when using user login, select the organization if prompted.

Your DGX Spark is now connected and accessible through Brev.

Connecting to Your DGX Spark

On the computer you want to connect from, install the Brev CLI, log in with your Brev user account, and select the organization where you registered the Spark. Replace my-org with your organization name:

brev login
brev org set "my-org"
brev shell my-dgx-spark

Use a user login for SSH, rather than API-key login. If this computer already uses API-key authentication, follow Return to User Login first.

Sharing with Your Team

From your computer, grant SSH access to a teammate, completing any login prompts:

brev grant-ssh

Select the organization, machine, SSH port, org member, and Linux user to grant access. Once granted, they can follow Connecting to Your DGX Spark from their own computer, using their own Brev login.

To revoke access later:

brev revoke-ssh

Port Forwarding

With Jupyter running on port 8888 on your DGX Spark, run this on your local computer:

brev port-forward my-dgx-spark --port 8888:8888

Open http://localhost:8888 in your local browser.

To also forward TensorBoard, run a separate command while TensorBoard is running on port 6006 on the Spark:

brev port-forward my-dgx-spark --port 6006:6006

Use one command per port mapping. Repeating --port in the same command only uses the last value.

Next Steps