Basic Quickstart (CLI)
Use this documentation to get a basic introduction to NVIDIA AI Workbench. For the full list of quickstarts, see Quickstart Guides.
In this quickstart, you use the command line interface (CLI) to perform the following tasks:
Before you can complete the steps in this quickstart, you need the following:
NVIDIA AI Workbench is installed on your local system. For more information, see Install AI Workbench.
Open a command shell by doing one of the following:
On macOS or Ubuntu — Open your favorite command shell, such as terminal.
On Windows — Open the WSL app by searching for WSL in your app list. When the WSL app opens, you should see a command prompt similar to the following:
workbench@computer-name:~$
TipYou can also use Terminal, Command Prompt, or Windows PowerShell, and access WSL by using the command
wsl -d NVIDIA-Workbench
.
Check the available locations (contexts) on your computer by running the following command.
nvwb list contexts
If you haven’t added any remote locations yet, the only available location is the local computer. The output should look similar to the following.
NAME | DESCRIPTION | HOSTNAME | STATUS --------|-------------|-----------|--------------- local | My Computer | localhost | Not Running
Run the following command to start the local location.
nvwb activate local
AI Workbench starts and connects to your computer, and
(nvwb:local)
now appears at the beginning of your command prompt.
Start the process to create a project by running the following command.
nvwb create project
Enter the project name, description, and press enter to choose the Python Basic container as the base environment for your project. You should see prompts similar to the following.
? Enter a unique name for the project: test-cli-proj ? Enter a description: A hello world test project ? Choose a base environment: Python Basic Created new project 'test-cli-proj' (/home/nvidia/nvidia-workbench/test-project) ✓ Container build complete (59.172564951s)
After you see Container build complete, use the following command to open the project.
nvwb open test-cli-proj
AI Workbench opens your project, changes to the project directory, and
(nvwb:local/test-cli-proj)
now appears at the beginning of your command prompt.
To open JupyterLab, run the following command.
JupyterLab opens in your default browser ready for you to start working.
nvwb start jupyterlab
In JupyterLab, do the following.
Navigate to the code folder.
Create a new notebook by choosing Python 3 (ipykernel).
In the new notebook, enter
print("Hello World!")
.Click run to verify the code works correctly.
Save the notebook, and name the file hello-world.ipynb.
In JupyterLab, choose File, and then click Shut Down. Confirm shut down and close the browser tab.
In your command shell, run the following command to stop your environment.
nvwb stop --container
Each AI Workbench project is stored as a Git repository. When you are ready to save changes to your project, you commit and push the changes to your Git repository. For more information, see Connect to Git.
Check for changes to your project by running the following command.
nvwb status
You should see output similar to the following. In this case, there is one new file, the notebook that you added.
Name: test-cli-proj (/home/workbench/nvidia-workbench/test-cli-proj) Description: A hello world test project Environment: No Build Required Container: Stopped Applications: jupyterlab: Stopped Local Repository: 1 Added
To create a commit that contains your changes, run the following command.
nvwb commit
AI Workbench creates the commit message for you.
Press enter to accept the commit message and commit your changes.
To publish your changes to a Git server, run the following command. You are prompted for the information to publish your changes.
nvwb publish
Open https://github.com/<user_name>/test-cli-proj and verify that you see your project.
Do a Quickstart
Explore sample projects <example-projects>
Explore the NVIDIA Developer Forum
Learn the Concepts