name: create-env description: Set up a reproducible Python project environment on the remote server using pixi or uv. Use when executing a project environment setup node generated by the jumpstart mechanism.
Create Environment
Initialize and configure the project environment based on the selected package manager and project type.
Supported Managers
pixi (recommended for ML / data science)
- Conda-compatible, reproducible lock files, multi-language support
- Install:
curl -fsSL https://pixi.sh/install.sh | bash && export PATH="$HOME/.pixi/bin:$PATH"
uv (recommended for pure Python)
- Extremely fast pip/PyPI package manager, PEP 517/518 compliant
- Install:
curl -LsSf https://astral.sh/uv/install.sh | sh && source "$HOME/.cargo/env"
Workflow
- Check whether the package manager is installed; install if missing
- Check for an existing config file (
pixi.toml,pyproject.toml,requirements.txt) - Initialize if no config exists:
pixi initoruv init --python 3.11 - Install packages based on project type (see table below)
- Verify key imports succeed and lock file is present
Package Sets by Project Type
| Type | pixi channels + packages | uv packages |
|---|---|---|
deep-learning |
-c pytorch -c conda-forge: python pytorch torchvision torchaudio |
torch torchvision torchaudio |
data-science |
-c conda-forge: python numpy pandas scikit-learn matplotlib seaborn jupyterlab ipykernel |
numpy pandas scikit-learn matplotlib seaborn jupyterlab ipykernel |
nlp |
-c conda-forge: python transformers datasets tokenizers accelerate |
transformers datasets tokenizers accelerate |
pure-text |
(no packages) | (no packages) |
from-repo |
detect from cloned repo's requirements/setup files | same |
custom |
as specified | as specified |
pixi Commands
# Ensure pixi is installed
command -v pixi || (curl -fsSL https://pixi.sh/install.sh | bash && export PATH="$HOME/.pixi/bin:$PATH")
# Initialize (skip if pixi.toml exists)
test -f pixi.toml || pixi init
# Deep learning (GPU — adjust cuda version as needed)
pixi add python pytorch torchvision torchaudio -c pytorch -c conda-forge
# Data science
pixi add python numpy pandas scikit-learn matplotlib seaborn jupyterlab -c conda-forge
# NLP
pixi add python transformers datasets tokenizers accelerate -c conda-forge
# Verify
pixi run python -c "import torch; print('torch', torch.__version__)"
uv Commands
# Ensure uv is installed
command -v uv || (curl -LsSf https://astral.sh/uv/install.sh | sh && source "$HOME/.cargo/env")
# Initialize (skip if pyproject.toml exists)
test -f pyproject.toml || uv init --python 3.11
# Deep learning
uv add torch torchvision torchaudio
# Data science
uv add numpy pandas scikit-learn matplotlib seaborn jupyterlab ipykernel
# NLP
uv add transformers datasets tokenizers accelerate
# Verify
uv run python -c "import torch; print('torch', torch.__version__)"
From Repo URL
If a repository URL was provided during jumpstart:
- Clone minimally:
git clone --depth 1 <url> _repo_tmp - Copy dependency files:
cp _repo_tmp/requirements*.txt . 2>/dev/null || true - Install copied requirements:
pixi add $(grep -v '^#' requirements.txt | head -50 | tr '\n' ' ') -c conda-forge - Clean up:
rm -rf _repo_tmp
Verification Targets
After setup, confirm:
pixi run python --versionoruv run python --versionsucceeds- Key package imports for the project type succeed
- Lock file exists:
pixi.lock(pixi) oruv.lock(uv)
Error Handling
- If pixi/uv install fails: try
pip installas fallback, note the degraded state - If package not found in conda channel: add
-c conda-forgeor try uv instead - If CUDA packages fail: install CPU-only variant first, note GPU variant for later