Manage Packages#
Overview#
- This guide covers how to use the package manager in the Project Tab in the Desktop App.
The package manager lets you add packages to be built into the project container. You can use it while the container is running or stopped.
- You can use the package manager to install packages into a running container.
If the container is running, the packages will be installed live into the container. The relevant package files, e.g. requirements.txt will be updated and the container will be rebuilt the next time you start it.
- Editing package files directly without the package manager will not install them in a running container.
They will be built into the container the next time you start it. Starting a container that has new dependencies automatically triggers a rebuild.
Key Concepts#
- Package Manager
Feature in the Desktop App that lets you add packages to a running container. Automatically updates requirements.txt or apt.txt.
- requirements.txt
Lists Python packages to install with pip during container build. One package per line, optionally with version constraints.
- apt.txt
Lists system packages to install with apt during container build. One package per line.
- Container Rebuild
Building a new container image with updated package lists or configurations. Required when you edit package files directly.
Use the Package Manager#
- Step One: Open the package manager.
Select Project Tab > Project Container > Packages
Select Add Package
- Step Two: Add each package you need.
Select the package manager from the dropdown: pip, conda, or apt
Enter the package name
Optionally enter a version constraint (e.g.,
>=1.21.0)Select Add
Repeat for additional packages
- Step Three: Submit the changes.
Select Submit when finished adding packages
Success: Packages install in the running container.
Add Python Packages by Editing requirements.txt#
- Step One: Open requirements.txt in your project root.
Select Project Tab > Files > requirements.txt
Select Option Dots > Edit
- Step Two: Add packages to the file.
Add one package per line
Optionally specify versions:
numpy==1.21.0orpandas>=1.3.0Select Save
- Step Three: Rebuild the container.
Select Project Tab > Project Container > Start Build
Success: The container rebuilds with the new packages installed.
Add System Packages by Editing apt.txt#
- Step One: Open apt.txt in your project root.
Select Project Tab > Files > apt.txt
Select Option Dots > Edit
- Step Two: Add packages to the file.
Add one package per line
Use standard Debian/Ubuntu package names
Select Save
- Step Three: Rebuild the container.
Select Project Tab > Project Container > Start Build
Success: The container rebuilds with the new packages installed.
Remove Packages#
- Step One: Remove the package from the configuration file.
Delete the line from requirements.txt or apt.txt
Select Save
- Step Two: Rebuild the container.
Select Project Tab > Project Container > Start Build
Success: The container rebuilds without the removed package.
Note
Removing a package from the configuration file doesn’t uninstall it from a running container. You must rebuild to get a clean environment without the package.
Rebuild the Container#
- Step One: Start the rebuild.
Select Project Tab > Project Container > Start Build
Success: The build starts and you can monitor progress in the build output.