-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: reformat and improve system requirements docs
- Loading branch information
1 parent
158247d
commit 391c365
Showing
1 changed file
with
65 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,102 @@ | ||
# System Requirements in pixi | ||
|
||
The system requirements are used to define minimal system specifications used during dependency resolution. | ||
For example, we can define a unix system with a specific minimal libc version. | ||
This will be the minimal system specification for the project. | ||
System specifications are directly related to the [virtual packages](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-virtual.html). | ||
**System requirements** define the minimal system specifications necessary during dependency resolution for a project. | ||
For instance, specifying a Unix system with a particular minimal `libc` version ensures that dependencies are compatible | ||
with the project's environment. | ||
|
||
### The current minimal system requirements | ||
System specifications are closely related | ||
to [virtual packages](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-virtual.html), allowing for | ||
flexible and accurate dependency management. | ||
|
||
## Default System Requirements | ||
|
||
The following configurations outline the default minimal system requirements for different operating systems: | ||
|
||
=== "Linux" | ||
```toml title="default system requirements for linux" | ||
```toml | ||
# Default system requirements for Linux | ||
[system-requirements] | ||
linux = "4.18" | ||
libc = { family="glibc", version="2.28" } | ||
libc = { family = "glibc", version = "2.28" } | ||
``` | ||
=== "Windows" | ||
Windows has no minimal system requirements defined. | ||
=== "Osx" | ||
```toml title="default system requirements for osx" | ||
Windows currently has no minimal system requirements defined. If your project requires specific Windows configurations, | ||
you should define them accordingly. | ||
=== "osx-64" | ||
```toml | ||
# Default system requirements for macOS | ||
[system-requirements] | ||
macos = "13.0" | ||
``` | ||
=== "Osx-arm64" | ||
```toml title="default system requirements for osx-arm64" | ||
=== "osx-arm64" | ||
```toml | ||
# Default system requirements for macOS ARM64 | ||
[system-requirements] | ||
macos = "13.0" | ||
``` | ||
|
||
Only if a project requires a different set should you define them. | ||
## Customizing System Requirements | ||
|
||
For example, when installing environments on old versions of linux. | ||
You may encounter the following error: | ||
You only need to define system requirements if your project necessitates a different set from the defaults. | ||
This is common when installing environments on older or newer versions of operating systems. | ||
|
||
``` | ||
### Adjusting for Older Systems | ||
If you're encountering an error like: | ||
|
||
```bash | ||
× The current system has a mismatching virtual package. The project requires '__linux' to be at least version '4.18' but the system has version '4.12.14' | ||
``` | ||
|
||
This suggests that the system requirements for the project should be lowered. | ||
To fix this, add the following table to your configuration: | ||
This indicates that the project's system requirements are higher than your current system's specifications. | ||
To resolve this, you can lower the system requirements in your project's configuration: | ||
|
||
```toml | ||
[system-requirements] | ||
linux = "4.12.14" | ||
``` | ||
|
||
#### Using Cuda in pixi | ||
This adjustment informs the dependency resolver to accommodate the older system version. | ||
|
||
### Using CUDA in pixi | ||
|
||
To utilize CUDA in your project, you must specify the desired CUDA version in the system-requirements table. | ||
This ensures that CUDA is recognized and appropriately locked into the lock file if necessary. | ||
|
||
If you want to use `cuda` in your project you need to add the following to your `system-requirements` table: | ||
Example Configuration | ||
|
||
```toml | ||
[system-requirements] | ||
cuda = "11" # or any other version of cuda you want to use | ||
cuda = "12" # Replace "12" with the specific CUDA version you intend to use | ||
``` | ||
|
||
### Setting System Requirements environment specific | ||
This can be set per `feature` in the `the manifest` file. | ||
|
||
```toml | ||
[feature.cuda.system-requirements] | ||
cuda = "12" | ||
|
||
[environments] | ||
cuda = ["cuda"] | ||
``` | ||
|
||
This informs the solver that cuda is going to be available, so it can lock it into the lock file if needed. | ||
### Available Override Options | ||
In certain scenarios, you might need to override the system requirements detected on your machine. | ||
This can be particularly useful when working on systems that do not meet the project's default requirements. | ||
|
||
### Overriding system requirements / virtual packages | ||
To override the logic that checks which requirements are available on your machine you can set an environment variable. | ||
Overriding the virtual packages can be useful when you are working on a system that does not meet the requirements of the project. | ||
You can override virtual packages by setting the following environment variables: | ||
|
||
Here are the available options: | ||
- `CONDA_OVERRIDE_CUDA` | ||
- Description: Sets the CUDA version. | ||
- Usage Example: `CONDA_OVERRIDE_CUDA=11` | ||
- `CONDA_OVERRIDE_GLIBC` | ||
- Description: Sets the glibc version. | ||
- Usage Example: `CONDA_OVERRIDE_GLIBC=2.28` | ||
- `CONDA_OVERRIDE_OSX` | ||
- Description: Sets the macOS version. | ||
- Usage Example: `CONDA_OVERRIDE_OSX=13.0` | ||
|
||
- `CONDA_OVERRIDE_CUDA` - Sets the `cuda` version. e.g. `CONDA_OVERRIDE_CUDA=11` | ||
- `CONDA_OVERRIDE_GLIBC` - Sets the `libc` version to the `glibc` family. e.g. `CONDA_OVERRIDE_GLIBC=2.28` | ||
- `CONDA_OVERRIDE_OSX` - Sets the `macos` version. e.g. `CONDA_OVERRIDE_OSX=13.0` | ||
## Additional Resources | ||
|
||
The options are taken from `conda`. | ||
For more information, see the [conda documentation](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-virtual.html). | ||
For more detailed information on managing `virtual packages` and overriding system requirements, refer to | ||
the [Conda Documentation](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-virtual.html). |