- Better governance and compliance, since environment updates can be cascaded through derived environments.
- More robust automation, with the ability to test updated environments before production workloads adopt them.
- Easier troubleshooting and iteration, as new environment revisions can be built from any existing base.
Enable package persistence in an environment
To use package persistence, it must first be enabled in an environment.- Go to the Revisions tab of your compute environment.
- Create a new revision or edit an existing one.
- Check the box for Enable Package Persistence. If unchecked, this feature will not be available in workspaces using the environment.
Use package persistence in a workspace
Once package persistence is enabled in the environment, you can use it directly in your workspace.Install packages
Any packages you install manually will persist across workspace sessions:| Language | Install command |
|---|---|
| Python | pip install <package-name> |
| R | install.packages("<package-name>") |
What happens to requirements.txt
-
Domino automatically runs
requirements.txtat startup. - Before package persistence, this reinstalled packages every time.
- With persistence enabled, already-installed packages are skipped, speeding up workspace launch.
Control persistence on restart
When you restart a workspace that uses an environment with persistence enabled, you’ll see a Package Persistence checkbox:- Turn it on to keep your installed packages across sessions.
- Turn it off to start clean.
Enable package persistence for external environments
If you’re using a custom (external) environment, you’ll need to install the appropriate tools to support package persistence.| Language | Tool | Installation details |
|---|---|---|
Python | uv | Follow the uv installation guide to add it to your base or environment image. |
R | renv | Add this line to your Dockerfile: |
Home directory persistence
Domino also supports persistence of the$HOME directory, allowing you to retain user-specific files across workspace sessions. This is useful for preserving IDE settings, environment configs, or files related to tools like remote Ray clusters.
Enable $HOME directory persistence
-
When launching a workspace, toggle Home Directory Persistence to retain the contents of the
$HOMEdirectory between sessions. -
This setting ensures that any config files stored in
$HOME, such as IDE preferences,.sshkeys, or cluster configs, are preserved.
Next steps
- View workspace details about user actions, view current and historical workspace resource usage, and view sessions and commits that were made in a workspace.
- Use Git-based projects or import Git repositories to use in your workspace.
- Run multiple applications in the same workspace session if needed.