create-env

star 175

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.

CurryTang By CurryTang schedule Updated 3/4/2026

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

  1. Check whether the package manager is installed; install if missing
  2. Check for an existing config file (pixi.toml, pyproject.toml, requirements.txt)
  3. Initialize if no config exists: pixi init or uv init --python 3.11
  4. Install packages based on project type (see table below)
  5. 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:

  1. Clone minimally: git clone --depth 1 <url> _repo_tmp
  2. Copy dependency files: cp _repo_tmp/requirements*.txt . 2>/dev/null || true
  3. Install copied requirements: pixi add $(grep -v '^#' requirements.txt | head -50 | tr '\n' ' ') -c conda-forge
  4. Clean up: rm -rf _repo_tmp

Verification Targets

After setup, confirm:

  • pixi run python --version or uv run python --version succeeds
  • Key package imports for the project type succeed
  • Lock file exists: pixi.lock (pixi) or uv.lock (uv)

Error Handling

  • If pixi/uv install fails: try pip install as fallback, note the degraded state
  • If package not found in conda channel: add -c conda-forge or try uv instead
  • If CUDA packages fail: install CPU-only variant first, note GPU variant for later
Install via CLI
npx skills add https://github.com/CurryTang/Amadeus --skill create-env
Repository Details
star Stars 175
call_split Forks 17
navigation Branch main
article Path SKILL.md
More from Creator