Runtime Environment FAQ (Frequently Asked Questions)
Summary and answers to common questions about runtime environments (images)
How can I save my installed dependencies to avoid reinstalling them after each restart?
There are two ways to save your dependencies:
- In the default environment, you can install dependencies using
pip install --user xxx. Packages installed this way will be stored in the user directory and will not be lost after a restart. - Create a custom isolated environment and place it under the user directory (
/hyperai/home)). For Conda-based runtimes, refer to Dependency Management with Conda; for uv-based runtimes (Ubuntu 24.04 and later, such asvllm 0.20and above), refer to Managing Python environments with uv.
However, dependencies installed via apt cannot be saved and need to be reinstalled at startup.
When using uv pip install, why do packages disappear after restart? Can I still use uv for dependencies?
Yes, you can still use uv normally. The platform does not restrict the use of uv commands. The key point is understanding where the packages are installed and whether that location is persistent across restarts.
The default Python environment in uv-based runtimes is a virtual environment located at /opt/venv. Running uv pip install <package> installs packages into this venv—they can be used immediately, but since /opt/venv is not in a persistent directory, the environment will be lost after a container restart.
If you need persistence, choose one of the following approaches depending on your use case:
- If you only need to add or pin a few packages on top of the default environment: use
pip install --user <package>. The packages will be installed into/output/.pylibs(a persistent directory) and automatically added tosys.path, so they will remain available after restart. See Persisting pip Dependencies. Note that uv itself does not support the--userflag; this step should use the systempip. - If you need a fully isolated environment (e.g., changing Python versions or fully separating dependencies): create a virtual environment using
uv venvunder/hyperai/homeand manage everything with uv. Since the environment is created in a persistent directory, you only need tosourceit again after restart. See Managing Python environments with uv.
| Requirement | Command | Persist after restart |
|---|---|---|
| Temporary installation (current session only) | uv pip install <package> | No |
| Extend default environment / pin a few packages | pip install --user <package> | Yes (/output/.pylibs) |
| Fully isolated environment (new Python version / clean separation) | uv venv under /hyperai/home | Yes (environment stored persistently) |
Note
When installing dependencies inside a custom uv environment, do not use --user. If you do, packages will be installed into /hyperai/home/.pylibs instead of the active environment, which may cause dependency conflicts.
Error when upgrading built-in packages: "Will not install to the user site because it will lack sys.path precedence"?
This issue has been fixed in the latest platform version: in uv-based runtimes, you can directly run pip install --user <package> to upgrade built-in packages (such as transformers, numpy). The updated version will take effect correctly and persist with the workspace.
If you are still encountering this error (i.e., your cluster has not been updated yet), you can temporarily resolve it by adding the --ignore-installed flag:
pip install --user --ignore-installed transformersIf you need to change multiple core package versions (e.g., replacing an entire framework stack), it is recommended to create a dedicated isolated environment instead. See Managing Python environments with uv.
Can I use custom runtime (images)?
Platform users currently cannot directly use custom images, but can use custom frameworks within the corresponding images.
We have added pre-built images for common versions of TensorFlow, PyTorch, MXNet, and Darknet that are ready to use. For more information about images, visit Runtime Environment (Images) Overview.
Is Caffe2 support provided?
According to Caffe2's official announcement, Caffe2 has been merged into PyTorch, so we no longer provide support for the Caffe2 framework. The HyperAI platform currently supports the PyTorch framework.