User Guide (Latest)
User Guide (Latest)

Packages

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

  • You may add, remove, and update packages managed by apt and pip package managers in your 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

Edit Package Files If desired, you can directly edit the files the AI 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 need to rebuild the container to apply the changes. This rebuild is a “full” rebuild, using cached layers when possible, but still rebuilding everything.

Use 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.

Packages installed in the base environment may be installed in the root environment or the user environment, depending on how the base container was created. Packages installed from your requirements.txt or via the Packages interface are installed in the user environment. If you need to install packages that require root privileges, you can use the sudo command in the preInstall.bash or postInstall.bash scripts.

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 is 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 execs into the running container and installs/removes/updates the 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.

Previous Environment Configuration
Next Scripts
© Copyright © 2024, NVIDIA Corporation. Last updated on Sep 17, 2024.