skills/tools/pei-docker-usage/SKILL.md
Helper for PeiDocker (`pei-docker-cli`). Trigger ONLY when the user explicitly requests PeiDocker usage OR when working within a PeiDocker-generated project (indicated by `user_config.yml`).
npx skillsauth add igamenovoer/magic-context pei-docker-usageInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
PeiDocker (pei-docker-cli) is a tool that automates the creation of Docker environments. Instead of writing complex Dockerfiles and docker-compose.yml files, you define your environment in a high-level YAML file (user_config.yml). PeiDocker then generates the necessary Docker configuration.
Official Repository: https://github.com/igamenovoer/PeiDocker
Key Features:
stage-1) from application/dev setup (stage-2).When invoking pei-docker-cli, follow this priority order:
pyproject.toml or pixi.toml with pei-docker dependency), use:
pixi run pei-docker-cli ...
uv tool run pei-docker-cli ...
pixi add pei-dockeruv tool install pei-dockerThe standard workflow for using PeiDocker is:
Initialize a new PeiDocker project in a target directory.
pixi run pei-docker-cli create -p path/to/project_dir
This creates the directory structure and a template user_config.yml.
user_config.yml)Edit the user_config.yml in the project directory to define your environment.
Key Sections:
stage_1: Base image settings (OS, system packages).
image: Base image (e.g., ubuntu:24.04) and output tag.ssh: Enable SSH, set ports and users.apt: Configure apt mirrors (e.g., tuna, aliyun).stage_2: Application/Developer settings.
storage: Define where /app, /data, and /workspace map to (host paths or auto-volumes).custom: Scripts to run on build, first run, or login.See basic-examples.md and advanced-examples.md for detailed configuration examples.
After editing user_config.yml, generate the docker-compose.yml and Dockerfiles.
# From within the project directory
cd path/to/project_dir
pixi run pei-docker-cli configure
# Or specifying the path
pixi run pei-docker-cli configure -p path/to/project_dir
Use standard docker compose commands to build and start the containers.
cd path/to/project_dir
# Build the images (progress=plain shows build logs)
docker compose build stage-1 --progress=plain
docker compose build stage-2 --progress=plain
# Run the container (usually stage-2 for development)
docker compose up -d stage-2
PeiDocker allows running scripts at various lifecycle stages. Scripts should be placed in container-scripts/ (to run inside container) or host-scripts/ (to run on host).
In user_config.yml:
stage_2:
custom:
on_build:
- 'stage-2/custom/install-my-app.sh'
on_first_run:
- 'stage-2/custom/setup-env.sh'
To enable SSH access:
stage_1:
ssh:
enable: true
port: 22 # Container internal port
host_port: 2222 # Host mapped port
users:
developer:
password: 'password123'
pubkey_file: '~' # Use current user's public key
user_config.yml options.user_config.yml file.data-ai
Create readable Mermaid diagrams inside Markdown files. Use for flowcharts and sequence diagrams that must render cleanly in common Markdown renderers (e.g., GitHub) without horizontal scrolling. Covers fenced mermaid blocks, init/theme styling, label wrapping with <br/>, and sequenceDiagram layout rules (short IDs, wrapped labels, don’t break identifiers).
development
Manual invocation only; use only when the user explicitly requests `make-program-tutorial` by exact name, OR when the user asks to use a skill to create an SDK/API/library tutorial. Create a clear, reproducible, step-by-step tutorial for a specific API/SDK/library (or a set of functions/classes), with runnable examples, expected outputs, and basic troubleshooting.
testing
Use when the user wants to create a self-hosted, offline-installable Conda channel (mirror) containing a specific subset of packages using Pixi.
tools
Guides the agent to setup a new or existing Pixi environment for compiling C++ and CUDA code. It ensures the correct compilers, toolkits, and CMake configurations are in place for a robust user-space build.