Packages

  • Users may add, remove, and update packages managed by apt and pip package managers in their AI Workbench projects.

  • You can edit the apt.txt file in the project repository to manage apt packages, and the requirements.txt file to manage pip packages directly

  • You can also use the desktop app’s package interface to add, remove, and update packages. Using the package interface has an significant benefits

Managing Packages in AI Workbench AI Workbench allows you to easily manage packages installed in your Project’s environment using apt and pip package managers.

Editing Package Files If desired, you can directly edit the files the Workbench Project uses to track packages. To manage apt packages, you can edit the apt.txt file in the project repository. Similarly, you can edit the requirements.txt file to manage pip packages directly.

After editing these files, you’ll need to rebuild the container to apply the changes. This rebuild will be a “full” rebuild, using cached layers when possible, but still rebuilding everything.

Using the Package Interface Alternatively, you can use the Desktop app’s package interface to add, remove, and update packages. The package interface offers significant benefits. It manipulates the environment configuration in a way that only requires a “quick build” and can add packages while the container is running.

When using the package interface, two primary actions occur:

  1. The associated package manager file is updated with your change (i.e. requirements.txt, apt.txt)

  2. A line is appended to the cached Dockerfile/Container file to make the specified change

This second step is what enables the “quick build” state. Here, you must build the container to apply the change, but the only uncached layer to build will be the single instruction to install/remove/update the specified package.

The package interface has another benefit when a Project container is running. After completing the two steps in the section above, AI Workbench will also exec into the running container and install/remove/update the package specified package.

This means you can quickly manipulate your running environment and keep on working. Then, when you are done working and stop the Project container, only a “quick-build” is needed to persist your changes into the container image for the next time you start working.

Support for managing packages through the CLI will be coming soon!

I added an invalid package, removed it, and now my container won’t build

In this case you are stuck in a “quick build loop”. Since the removing a package will add an instruction to uninstall, but this is after the failing instruction to install, you will keep getting an error. You can fix this by forcing the Containerfile to be regenerated in its “optimized” form and then building. You can do this in the Desktop app by clicking on the “Clear Cache and Build” button in the build output widget or using the --full-build flag in the CLI.

Previous Environment Configuration
Next Scripts
© Copyright © 2024, NVIDIA Corporation. Last updated on Apr 29, 2024.