Syntax
Commands
| Command | Description |
|---|---|
install | Install packages into the Python container |
list | List user-installed packages |
uninstall | Uninstall packages from the container |
apply | Apply package changes by rebuilding container |
Command Reference
install
Install Python packages persistently into the Lager Box container.
PACKAGES- One or more package names (with optional version specifiers)
--box BOX- Lagerbox name or IP address--yes- Skip confirmation and rebuild immediately
list
List user-installed packages on a Lager Box.
uninstall
Remove packages from the Lager Box container.
PACKAGES- One or more package names to remove
--box BOX- Lagerbox name or IP address--yes- Skip confirmation and rebuild immediately
apply
Apply pending package changes by rebuilding the container.
--yes and want to apply changes later.
How It Works
- Package Validation: Packages are validated against PyPI before installation
- Requirements File: Packages are added to
user_requirements.txton the Lager Box - Container Rebuild: Container is rebuilt with new packages (no-cache)
- Persistence: Packages persist across container restarts
Version Specifiers
Standard pip version specifiers are supported:| Specifier | Example | Description |
|---|---|---|
== | numpy==1.24.0 | Exact version |
>= | flask>=2.0 | Minimum version |
<= | requests<=2.28 | Maximum version |
~= | django~=4.0 | Compatible release |
| (none) | pandas | Latest version |
Package Storage
User packages are stored at:Deferred Rebuild
If you don’t use--yes, packages are queued for installation:
Examples
Package Name Normalization
Package names are normalized to handle variations:scikit-learnandscikit_learnare treated the same- Duplicates are automatically detected and skipped
PyPI Validation
Before installation, packages are validated:Notes
- Container rebuild uses
--no-cachefor fresh builds - Rebuild can take several minutes depending on packages
- Use
lager pip listto verify installation - Pre-installed packages (in base image) are not shown in list
- Container restart happens automatically after rebuild

