Build an AI Center of Excellence with Base Command
Build an AI Center of Excellence with Base Command (Latest Version)

Step #4: Launching VS Code on Base Command

With the VS Code image built, we can now run the container on Base Command. To verify the container is stored in your org’s private registry, navigate to ngc.nvidia.com and click Containers from the Private Registry menu on the left of the screen.

vscode-step-06-image-001.png

On the Containers page, create a new filter for Display Name and search for vscode - the vscode-server container should be visible on the page.

vscode-step-06-image-002.png

Click on your uploaded container to verify that the expected tag is present - you can verify the latest tag right on the page, or click the Select a tag… dropdown to view all available tags. Ensure tag 1.0 is present.

vscode-step-06-image-003.png

When ready, click on the Jobs link from the Base Command menu.

vscode-step-06-image-004.png

On the Jobs page, click Create Job.

vscode-step-06-image-005.png

Populate the Create Job form as follows.

  1. Select your ACE from the list.

  2. Select dgxa100.80g.1.norm in the INSTANCE table.

  3. Ignore the Datasets and Workspaces input tables for now.

  4. Enter /results for the Data Output field.

  5. Select the lp-org-name/lp-team-name/vscode-server container.

  6. Select the tag value of 1.0.

  7. For the command, copy the following:

Copy
Copied!
            

PASSWORD=mypass code-server --auth password --bind-addr 0.0.0.0:8899 & sleep 12h


  1. Add a container port just beneath the command of value 8899 - be sure to click the Add button to the right of the text box.

  2. The remainder of the form can be left with the default values - but if you like, you can change the job name and add a label to make filtering easier in the future.

To verify that the correct options were selected, check the ngc batch run command on your screen with the values in the screenshot below (the --name, --ace, and --org arguments may differ). When ready, click the Launch Job button near the top right corner of the page.

vscode-step-06-image-006.png

After submitting the job, you will be taken to the Jobs page where you can view the status of the job.

Once the job has a Status value of Running, click on it.

vscode-step-06-image-007.png

Click on the Overview tab, and click on the url present in the Mapped Ports section. This will open the VS Code web interface.

vscode-step-06-image-008.png

When the VS Code web interface loads, it will ask for a password. The value set when we specified the command to run in the job was mypass. Enter that value, and click the Submit button.

vscode-step-06-image-009.png

Once the next page loads, you should see a working VS Code web interface. It can now be used in place of a local VS Code interface, in an environment with direct access to NVIDIA GPUs (in the case of the job we launched, a single A100).

vscode-step-06-image-010.png

To prove this, open a terminal through VS Code and run nvidia-smi - the results from our example are shown in the image below.

vscode-step-06-image-011.png

© Copyright 2022-2023, NVIDIA. Last updated on Jan 10, 2023.