mirror of https://github.com/astral-sh/uv
Add temporary test files
This commit is contained in:
parent
4a90bef83e
commit
5ea51cee2c
|
|
@ -0,0 +1,26 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# build-wheels.sh
|
||||||
|
#
|
||||||
|
# This script builds wheels for the project's dependencies.
|
||||||
|
#
|
||||||
|
# It uses uv to build wheels for the following packages:
|
||||||
|
# - `provider_fictional_hw`: A fictional hardware provider package
|
||||||
|
# - `variantlib`: A library for handling variant configurations
|
||||||
|
#
|
||||||
|
# The wheels are built and placed in the ./wheels directory.
|
||||||
|
#
|
||||||
|
# Any existing wheels are removed before building.
|
||||||
|
|
||||||
|
set -euxo pipefail
|
||||||
|
|
||||||
|
UV=./target/debug/uv
|
||||||
|
|
||||||
|
# Create the destination directory if it doesn't exist.
|
||||||
|
rm -rf wheels
|
||||||
|
mkdir wheels
|
||||||
|
|
||||||
|
# Build the wheels for the fictional hardware provider package.
|
||||||
|
$UV build --out-dir ./wheels --project ./vendor/provider_fictional_hw
|
||||||
|
|
||||||
|
# Build the wheels for the variant library.
|
||||||
|
$UV build --out-dir ./wheels --project ./vendor/variantlib
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,61 @@
|
||||||
|
{
|
||||||
|
"default-priorities": {
|
||||||
|
"feature": {
|
||||||
|
"cpu_level": [
|
||||||
|
"x86_64_level"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"namespace": [
|
||||||
|
"cpu_level"
|
||||||
|
],
|
||||||
|
"property": {
|
||||||
|
"cpu_level": {
|
||||||
|
"x86_64_level": [
|
||||||
|
"v4",
|
||||||
|
"v3",
|
||||||
|
"v2",
|
||||||
|
"v1"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"providers": {
|
||||||
|
"cpu_level": {
|
||||||
|
"enable-if": "platform_machine == 'x86_64' or platform_machine == 'AMD64'",
|
||||||
|
"plugin-api": "cpu_level_provider",
|
||||||
|
"requires": [
|
||||||
|
"cpu_level_provider"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"variants": {
|
||||||
|
"cpu1": {
|
||||||
|
"cpu_level": {
|
||||||
|
"x86_64_level": [
|
||||||
|
"v1"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"cpu2": {
|
||||||
|
"cpu_level": {
|
||||||
|
"x86_64_level": [
|
||||||
|
"v2"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"cpu3": {
|
||||||
|
"cpu_level": {
|
||||||
|
"x86_64_level": [
|
||||||
|
"v3"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"cpu4": {
|
||||||
|
"cpu_level": {
|
||||||
|
"x86_64_level": [
|
||||||
|
"v4"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -23,6 +23,13 @@ scripts = "scripts"
|
||||||
data = "assets"
|
data = "assets"
|
||||||
headers = "header"
|
headers = "header"
|
||||||
|
|
||||||
|
[variant.default-priorities]
|
||||||
|
namespace = ["cpu_level"]
|
||||||
|
|
||||||
|
[variant.providers.cpu_level]
|
||||||
|
requires = ["cpu_level_provider >= 0.1, <0.2"]
|
||||||
|
enable-if = "platform_machine == 'x86_64' or platform_machine == 'AMD64'"
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["uv_build>=0.8.0,<0.10.0"]
|
requires = ["uv_build>=0.8.0,<0.10.0"]
|
||||||
build-backend = "uv_build"
|
build-backend = "uv_build"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
uv venv --clear -q -p 3.13 && echo "torch" | cargo run -q -- pip compile - --index https://download.pytorch.org/whl/test/variant/ --no-progress --no-annotate -v # --no-cache
|
||||||
|
|
||||||
|
export NV_VARIANT_PROVIDER_FORCE_KMD_DRIVER_VERSION=570.133.20
|
||||||
|
export NV_VARIANT_PROVIDER_FORCE_CUDA_DRIVER_VERSION=12.8
|
||||||
|
uv venv --clear -q -p 3.13 && echo "torch" | cargo run -q -- pip compile - --index https://download.pytorch.org/whl/test/variant/ --no-progress --no-annotate -v # --no-cache
|
||||||
|
|
||||||
|
# For user testing
|
||||||
|
# cargo run pip install torch --index https://download.pytorch.org/whl/test/variant/ --no-cache
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# No matching variant wheel, no non-variant wheel or sdist
|
||||||
|
uv venv -q && ( ( UV_CPU_LEVEL_OVERRIDE=0 cargo run pip install built-by-uv --no-index --no-cache --no-progress --find-links ./files && exit 1 ) || exit 0 )
|
||||||
|
# No matching variant wheel, but a non-variant wheel
|
||||||
|
uv venv -q && UV_CPU_LEVEL_OVERRIDE=0 cargo run pip install built-by-uv --no-index --no-cache --no-progress --find-links ./files --find-links ./files_wheel
|
||||||
|
# No matching variant wheel, but a non-variant sdist
|
||||||
|
uv venv -q && UV_CPU_LEVEL_OVERRIDE=0 cargo run pip install built-by-uv --no-index --no-cache --no-progress --find-links ./files --find-links ./files_sdist
|
||||||
|
# Matching cpu2 variant wheel
|
||||||
|
uv venv -q && UV_CPU_LEVEL_OVERRIDE=2 cargo run pip install built-by-uv --no-index --no-cache --no-progress -v --find-links ./files --find-links ./files_wheel
|
||||||
|
# Matching cpu2 variant wheel, to be preferred over the wheel and the sdist
|
||||||
|
uv venv -q && UV_CPU_LEVEL_OVERRIDE=2 cargo run pip install built-by-uv --no-index --no-cache --no-progress -v --find-links ./files --find-links ./files_wheel --find-links ./files_sdist
|
||||||
Loading…
Reference in New Issue