pixi#
End-to-end walk-through of workflow installation and execution with pixi.
Pixi works with workspaces instead of environments: its commands need a directory with a
pixi.toml file, selected with --manifest-path. Like conda it installs python itself
and it takes its packages from the conda channels, with the packages of the python package
index in a section of their own.
Install pixi#
export PIXI_HOME=$HOME/.pixi # default location
export PIXI_NO_PATH_UPDATE=true
curl -fsSL https://pixi.sh/install.sh | sh
export PATH=$PIXI_HOME/bin:$PATH
export PIXI_HOME=$HOME/.pixi # default location
export PIXI_NO_PATH_UPDATE=true
curl -fsSL https://pixi.sh/install.sh | sh
export PATH=$PIXI_HOME/bin:$PATH
$env:PIXI_HOME = "$env:USERPROFILE\.pixi" # default location
$env:PIXI_NO_PATH_UPDATE = "true"
irm -useb https://pixi.sh/install.ps1 | iex
$env:PATH = "$env:PIXI_HOME\bin;$env:PATH"
Producer side#
Create a workspace, install ewoks in it and store a workflow with the packages
of that workspace as its requirements
pixi init ewoks_producer
pixi add --manifest-path ewoks_producer/pixi.toml python pip
pixi add --manifest-path ewoks_producer/pixi.toml --pypi ewoks
pixi run --manifest-path ewoks_producer/pixi.toml ewoks convert demo demo.json --test
pixi init ewoks_producer
pixi add --manifest-path ewoks_producer/pixi.toml python pip
pixi add --manifest-path ewoks_producer/pixi.toml --pypi ewoks
pixi run --manifest-path ewoks_producer/pixi.toml ewoks convert demo demo.json --test
pixi init ewoks_producer
pixi add --manifest-path ewoks_producer\pixi.toml python pip
pixi add --manifest-path ewoks_producer\pixi.toml --pypi ewoks
pixi run --manifest-path ewoks_producer\pixi.toml ewoks convert demo demo.json --test
Install any package that provides tasks instead of
ewoks for a real workflow. pixi run executes in the current directory, so the
workflow paths are relative to it and not to the workspace.
Re-producer side#
Only ewoks itself is needed to recreate the environment of demo.json
pixi init ewoks_reproducer
pixi add --manifest-path ewoks_reproducer/pixi.toml python pip
pixi add --manifest-path ewoks_reproducer/pixi.toml --pypi ewoks
pixi run --manifest-path ewoks_reproducer/pixi.toml ewoks install demo.json --yes --env-root ewoks_envs
pixi init ewoks_reproducer
pixi add --manifest-path ewoks_reproducer/pixi.toml python pip
pixi add --manifest-path ewoks_reproducer/pixi.toml --pypi ewoks
pixi run --manifest-path ewoks_reproducer/pixi.toml ewoks install demo.json --yes --env-root ewoks_envs
pixi init ewoks_reproducer
pixi add --manifest-path ewoks_reproducer\pixi.toml python pip
pixi add --manifest-path ewoks_reproducer\pixi.toml --pypi ewoks
pixi run --manifest-path ewoks_reproducer\pixi.toml ewoks install demo.json --yes --env-root ewoks_envs
The environment of the workflow is a pixi workspace in ewoks_envs/demo with the
environment in its .pixi/envs/default directory.
Execute the workflow#
pixi run --manifest-path ewoks_reproducer/pixi.toml ewoks execute --env ewoks_envs/demo demo.json --outputs=all
pixi run --manifest-path ewoks_reproducer/pixi.toml ewoks execute --env ewoks_envs/demo demo.json --outputs=all
pixi run --manifest-path ewoks_reproducer\pixi.toml ewoks execute --env ewoks_envs\demo demo.json --outputs=all
Clean up#
rm -rf ewoks_producer ewoks_reproducer ewoks_envs demo.json
rm -rf ewoks_producer ewoks_reproducer ewoks_envs demo.json
Remove-Item -Recurse -Force ewoks_producer, ewoks_reproducer, ewoks_envs, demo.json