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 AI Workbench CLI to perform the following tasks:
Prerequisites#
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.
Start AI Workbench and Open a Location#
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:
1workbench@computer-name:~$
Tip
You 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) by running the following command.
1nvwb 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.
1 NAME | DESCRIPTION | HOSTNAME | STATUS 2--------|-------------|-----------|--------------- 3 local | My Computer | localhost | Not Running
Run the following command to start the local location.
1nvwb activate local
AI Workbench starts and connects to your computer, and
(nvwb:local)
now appears at the beginning of your command prompt.
Create a New Project#
Start the process to create a project by running the following command.
1nvwb 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.
1? Enter a unique name for the project: test-cli-proj 2? Enter a description: A hello world test project 3? Choose a base environment: Python Basic 4 5 Created new project 'test-cli-proj' (/home/nvidia/nvidia-workbench/test-project) 6 7 ✓ Container build complete (59.172564951s)
After you see Container build complete, use the following command to open the project.
1nvwb 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.
Use JupyterLab to Write Simple Code#
To open JupyterLab, run the following command.
JupyterLab opens in your default browser ready for you to start working.
1nvwb 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.
1nvwb stop --container
(Optional) Publish Your Project to a Git Server#
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.
1nvwb status
You should see output similar to the following. In this case, there is one new file, the notebook that you added.
1Name: test-cli-proj (/home/workbench/nvidia-workbench/test-cli-proj) 2Description: A hello world test project 3Environment: No Build Required 4Container: Stopped 5Applications: 6 jupyterlab: Stopped 7Local Repository: 1 Added
To create a commit that contains your changes, run the following command.
1nvwb 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.
1nvwb publish
Open https://github.com/<user_name>/test-cli-proj and verify that you see your project.
Next Steps#
Do a Quickstart
Explore the NVIDIA Developer Forum
Learn the Concepts