-
Notifications
You must be signed in to change notification settings - Fork 30
CEP XXXX: Virtual packages #103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 4 commits
ebcfa8e
cda0a8c
6f2d60f
9a793b9
9b4b7a7
59462ed
cedde6a
df9d61d
72022f4
7c3b595
e6fcda5
40b4442
bc6d6a6
5bf10f1
7a2c7e5
cd06910
e520336
1b01182
2148654
eaeb222
9a95c6b
6a9f82e
d4b32f9
edeb09c
30a6030
6b6714e
83ea61e
be15de8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,127 @@ | ||||||||||||||
| # CEP ???? - Virtual packages | ||||||||||||||
|
|
||||||||||||||
| <table> | ||||||||||||||
| <tr><td> Title </td><td> Virtual packages </td> | ||||||||||||||
| <tr><td> Status </td><td> Draft </td></tr> | ||||||||||||||
| <tr><td> Author(s) </td><td> Jaime Rodríguez-Guerra <[email protected]></td></tr> | ||||||||||||||
| <tr><td> Created </td><td> Dec 17, 2024</td></tr> | ||||||||||||||
| <tr><td> Updated </td><td> Dec 17, 2024</td></tr> | ||||||||||||||
| <tr><td> Discussion </td><td> NA </td></tr> | ||||||||||||||
| <tr><td> Implementation </td><td> Several </td></tr> | ||||||||||||||
| </table> | ||||||||||||||
|
|
||||||||||||||
| > The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", | ||||||||||||||
| "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as | ||||||||||||||
| described in [RFC2119][RFC2119] when, and only when, they appear in all capitals, as shown here. | ||||||||||||||
|
|
||||||||||||||
| ## Abstract | ||||||||||||||
|
|
||||||||||||||
| This CEP standardizes which virtual packages MUST be offered by conda solvers. | ||||||||||||||
|
|
||||||||||||||
| ## Specification | ||||||||||||||
|
|
||||||||||||||
| A virtual package is defined as a package record with three fields: name, version and build string. | ||||||||||||||
| The name MUST start with double underscore. The version and build string MUST follow the same semantics as in regular package records. | ||||||||||||||
|
|
||||||||||||||
jaimergp marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||
| ### List of virtual packages | ||||||||||||||
|
|
||||||||||||||
| In alphabetical order, every conda client MUST support the following virtual packages: | ||||||||||||||
|
|
||||||||||||||
| - `__archspec` | ||||||||||||||
| - `__cuda` | ||||||||||||||
| - `__glibc` | ||||||||||||||
| - `__linux` | ||||||||||||||
| - `__osx` | ||||||||||||||
| - `__unix` | ||||||||||||||
| - `__win` | ||||||||||||||
|
|
||||||||||||||
| #### `__archspec` | ||||||||||||||
|
|
||||||||||||||
| This virtual package MUST be always present, with the version set to `1`. The build string SHOULD reflect the detected CPU microarchitecture. If it cannot be detected, the build string SHOULD be `0`. | ||||||||||||||
jakirkham marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||
|
|
||||||||||||||
| The build string MUST be overridable with the `CONDA_OVERRIDE_ARCHSPEC` environment variable, if set to a non-empty value. | ||||||||||||||
jakirkham marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
baszalmstra marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||
|
|
||||||||||||||
| #### `__cuda` | ||||||||||||||
|
|
||||||||||||||
| This virtual package MUST be present when the system exhibits GPU drivers compatible with the CUDA runtimes. When available, the version value MUST be set to the oldest CUDA version supported by the detected drivers (i.e. the formatted value of `libcuda.cuDriverGetVersion()`), constrained to the first two components (major and minor) and formatted as `{major}.{minor}`. The build string MUST be `0`. | ||||||||||||||
|
|
||||||||||||||
|
||||||||||||||
| This virtual package MUST be present when the system exhibits GPU drivers compatible with the CUDA runtimes. When available, the version value MUST be set to the oldest CUDA version supported by the detected drivers (i.e. the formatted value of `libcuda.cuDriverGetVersion()`), constrained to the first two components (major and minor) and formatted as `{major}.{minor}`. The build string MUST be `0`. | |
| This virtual package MUST be present when the system exhibits NVIDIA GPU drivers compatible with the CUDA runtimes. | |
| For systems without such support the virtual package MUST NOT be present. | |
| When available, the version value MUST be set to the latest CUDA version supported by the detected drivers (i.e. | |
| the formatted value of [`cuDriverGetVersion()`]( https://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__VERSION.html )), | |
| constrained to the first two components (major and minor) and formatted as `{major}.{minor}`. The build string MUST be `0`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks John. With 12+, how is the upper bound determined? It's not about major.minor anymore, right? e.g. how do I know which y to use in <=12.y? Or are we expected to use <13?.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each new CUDA Toolkit has a minimum driver version requirement, but has no upper bound. For example, you can run programs compiled with CTK 1.0 using the latest driver. You cannot run programs compiled with CTK 13.0 on machine that is running a driver from CTK 1.0. The CUDA driver has a stable ABI.
Therefore, __cuda=8.0 means that the newest CTK you can use is 8.0, but you can also use 7.5, 7.0, 6.5, ...
I hope that's clear.
jaimergp marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
jaimergp marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think MUSL should be its own thing. It is versioned differently. Plus users presumably want to distinguish GLIBC built packages from MUSL ones
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the stdlib infrastructure, we have the technical requirements in place to do something like:
c_stdlib: # [linux]
- sysroot # [linux]
- musl # [linux]
c_stdlib_version: # [linux]
- 2.17 # [linux]
- 1.2 # [linux]
zip_keys: # [linux]
- - c_stdlib # [linux]
- c_stdlib_version # [linux]Whether we want to roll out a "conda-forge for musl" is of course a separate question.
For the purpose of this CEP, definitely __glibc needs to stay musl-free IMO. For future-proofing, we could add __musl, but no strong feelings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the GLIBC version in MUSL distros, not the MUSL version itself. Happy to adjust the wording though. See this block in the constructor SH templates for some more context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having glibc in musl is certainly not the default, I actually didn't know this is supported - TIL. In that case I agree it makes sense to report the glibc that's found.
So my point was that we could also build musl-native libs, but I guess that's much less urgent if alpine-users can just install a glibc compat (assuming this works with our glibc-flavoured packages).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reading the original comment ( conda/constructor#850 (comment) ), think that user is referring to gcompat:
...a library which provides glibc-compatible APIs for use on musl libc systems.
While that can be useful, think we should not encode that in this CEP
It may make sense to have a CEP extending this for MUSL (perhaps including gcompat) and this could be one detail we include there, but would suggest we leave it out of this version and save it as future work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that user is referring to gcompat:
I'm not sure the original report was about gcompat, but about this alpine-focused glibc version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The challenge is if we include this line (even as an example) future readers will look at this line and say "Hey that is how they said we should be supporting MUSL." Even if that is not what we meant. So taking this line out is safer than keep it IMO
The rest of the examples above seem fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jakirkham: think that user is referring to
gcompat:
Look at the alpine wiki link I posted:
[wiki] If you want to run glibc programs in Alpine Linux, there are a few ways of doing so.
gcompat is one of them, but there are others.
@jakirkham: future readers will look at this line and say "Hey that is how they said we should be supporting MUSL."
I don't think that's realistic; it's also easy to preempt - just say "the version of glibc, if present (musl-based distros like alpine only provide this for compatibility; their main C library is musl itself)"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry Axel think we had posted around the same time. Agree there can be other ways people try to handle this need
To loop back to Jaime's original point on how to word this, what if we just say the following
| - System's `libc.so` (in MUSL distros, location not standardized) | |
| - System's GNU `libc.so` (see specific disto for location) |
Note: Some distros put libc.so in different places. So this is worth stating in its own right
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reworded these paragraphs a bit including the intent of the suggestions, let me know what you think!
Uh oh!
There was an error while loading. Please reload this page.