Same but with pixi

This commit is contained in:
jaimergp
2024-10-02 23:40:35 +02:00
parent c344fcf5c2
commit af04d0a8f9
6 changed files with 49 additions and 32 deletions
+12 -9
View File
@@ -1,9 +1,12 @@
conda>=23.7.3
conda-libmamba-solver>=23.7.0
conda-build>=24.3
conda-index>=0.3.0
conda-forge-ci-setup>=4.9.3,<5.0
conda-forge-pinning
frozendict
networkx=2.4
rattler-build-conda-compat>=1.2.0,<2.0.0a0
channels:
- conda-forge
dependencies:
- conda>=23.7.3
- conda-libmamba-solver>=23.7.0
- conda-build>=24.3
- conda-index>=0.3.0
- conda-forge-ci-setup>=4.9.3,<5.0
- conda-forge-pinning
- frozendict
- networkx=2.4
- rattler-build-conda-compat>=1.2.0,<2.0.0a0
+13
View File
@@ -0,0 +1,13 @@
name: staged-recipes
channels:
- conda-forge
dependencies:
- conda>=23.7.3
- conda-libmamba-solver>=23.7.0
- conda-build>=24.3
- conda-index>=0.3.0
- conda-forge-ci-setup>=4.9.3,<5.0
- conda-forge-pinning
- frozendict
- networkx=2.4
- rattler-build-conda-compat>=1.2.0,<2.0.0a0
+2
View File
@@ -6,3 +6,5 @@
*.yaml text eol=lf
*.sh text eol=lf
*.bat text eol=crlf
# GitHub syntax highlighting
pixi.lock linguist-language=YAML linguist-generated=true
+1
View File
@@ -7,6 +7,7 @@ build_artifacts
# Compiled Python code
__pycache__
*.pyc
*.egg-info
# Editor files
*.swp
+9 -10
View File
@@ -6,21 +6,20 @@ source .scripts/logging_utils.sh
( startgroup "Ensuring Miniforge" ) 2> /dev/null
MICROMAMBA_VERSION="1.5.10-0"
MICROMAMBA_URL="https://github.com/mamba-org/micromamba-releases/releases/download/${MICROMAMBA_VERSION}/micromamba-osx-64"
MINIFORGE_ROOT="${MINIFORGE_ROOT:-${HOME}/Miniforge3}"
PIXI_VERSION="0.30.0"
PIXI_URL="https://github.com/prefix-dev/pixi/releases/download/v${PIXI_VERSION}/pixi-x86_64-apple-darwin"
MINIFORGE_ROOT="$CWD/.pixi/envs/default"
if [[ -d "${MINIFORGE_ROOT}" ]]; then
echo "Miniforge already installed at ${MINIFORGE_ROOT}."
else
echo "Downloading micromamba %MICROMAMBA_VERSION%"
micromamba_tmp="$(mktemp -d)/micromamba"
curl -L -o "${micromamba_tmp}" "${MICROMAMBA_URL}"
chmod +x "${micromamba_tmp}"
echo "Downloading pixi ${PIXI_VERSION}"
pixi_tmp="$(mktemp -d)/pixi"
curl -L -o "${pixi_tmp}" "${PIXI_URL}"
chmod +x "${pixi_tmp}"
echo "Creating environment"
"${micromamba_tmp}" create --yes --root-prefix ~/.conda --prefix "${MINIFORGE_ROOT}" \
--channel conda-forge \
--file .ci_support/requirements.txt
"${pixi_tmp}" init --import .ci_support/requirements.yaml --platform osx-64
"${pixi_tmp}" install
fi
( endgroup "Ensuring Miniforge" ) 2> /dev/null
+12 -13
View File
@@ -11,23 +11,22 @@ setlocal enableextensions enabledelayedexpansion
call :start_group "Installing conda"
set "MICROMAMBA_VERSION=1.5.10-0"
set "MICROMAMBA_URL=https://github.com/mamba-org/micromamba-releases/releases/download/%MICROMAMBA_VERSION%/micromamba-win-64"
set "MICROMAMBA_TMPDIR=%TMP%\micromamba-%RANDOM%"
set "MICROMAMBA_TMP=%MICROMAMBA_TMPDIR%\micromamba.exe"
if "%MINIFORGE_ROOT%"=="" (
set "MINIFORGE_ROOT=%USERPROFILE%\Miniforge"
)
PIXI_VERSION="0.30.0"
PIXI_URL="https://github.com/prefix-dev/pixi/releases/download/v${PIXI_VERSION}/pixi-x86_64-pc-windows-msvc.exe"
set "PIXI_TMPDIR=%TMP%\pixi-%RANDOM%"
set "PIXI_TMP=%PIXI_TMPDIR%\pixi.exe"
set "MINIFORGE_ROOT=%CD%\.pixi\envs\default"
echo Downloading micromamba %MICROMAMBA_VERSION%
if not exist "%MICROMAMBA_TMPDIR%" mkdir "%MICROMAMBA_TMPDIR%"
certutil -urlcache -split -f "%MICROMAMBA_URL%" "%MICROMAMBA_TMP%"
echo Downloading pixi %PIXI_VERSION%
if not exist "%PIXI_TMPDIR%" mkdir "%PIXI_TMPDIR%"
certutil -urlcache -split -f "%PIXI_URL%" "%PIXI_TMP%"
if errorlevel 1 exit 1
echo Importing environment
call "%PIXI_TMP%" init --import .ci_support\requirements.yaml --platform win-64
if errorlevel 1 exit 1
echo Creating environment
call "%MICROMAMBA_TMP%" create --yes --root-prefix "%USERPROFILE%\.conda" --prefix "%MINIFORGE_ROOT%" ^
--channel conda-forge ^
--file .ci_support\requirements.txt
call "%PIXI_TMP%" install
if errorlevel 1 exit 1
call :end_group