From skill-sommelier
Convert Python scripts into production-ready Docker and Apptainer/Singularity containers with Pixi dependency management, automatic detection, multi-stage builds, and best practices. Supports GPU/CUDA configurations, multi-environment setups (CPU/GPU), HTCondor/SLURM integration, and .sif conversion for HPC. Use when users need to containerize Python applications, create Dockerfiles, generate Apptainer images, package Python code for deployment, need container configuration for Python projects, or want GPU-accelerated applications for HPC environments. Supports Pixi and pip workflows. Handles scripts, web apps, workers, services, and ML/data science workloads on Docker, Apptainer, and HPC systems.
How this skill is triggered — by the user, by Claude, or both
Slash command
/skill-sommelier:ss-python-to-chtcThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Convert Python applications into production-ready Docker containers with Pixi dependency management, intelligent analysis, optimized multi-stage builds, GPU/CUDA support, and comprehensive configuration.
Convert Python applications into production-ready Docker containers with Pixi dependency management, intelligent analysis, optimized multi-stage builds, GPU/CUDA support, and comprehensive configuration.
For simple containerization requests (uses Pixi by default):
dockerize_python.py within the plugin's install directory.
~/.claude/plugins/marketplaces/skill-sommelier/skills/ss-python-to-chtc/scripts/dockerize_python.py.skills/ss-python-to-chtc/scripts/dockerize_python.py.python <path_to_script>/dockerize_python.py <script.py> [output_dir]
The script automatically:
For pip-based workflow: Add --no-pixi flag to use traditional requirements.txt
User wants to containerize Python code
│
├─ Single script with clear entry point?
│ └─ Use dockerize_python.py script directly
│ └─ Present generated files to user
│
├─ Complex application (multiple files, custom setup)?
│ ├─ Read references/python_patterns.md for app type guidance
│ ├─ Read references/docker_best_practices.md for optimization
│ └─ Create custom Dockerfile based on patterns
│
├─ Existing Dockerfile needs improvement?
│ ├─ Read references/docker_best_practices.md
│ └─ Apply security and optimization recommendations
│
└─ Questions about Docker best practices?
└─ Consult references/docker_best_practices.md
User uploads data_processor.py and asks to containerize it.
Actions:
python <path_to_script>/dockerize_python.py data_processor.py ./docker_outputUser has Flask/FastAPI app and needs production Docker setup.
Actions:
references/python_patterns.md for web app patternsUser has PyTorch/TensorFlow model and needs GPU support.
Actions:
references/cuda_gpu_support.md for GPU patternspython <path_to_script>/dockerize_python.py model.py ./gpu_output --cuda 12docker run --gpus allUser needs specific Python version, non-root user, or security hardening.
Actions:
references/docker_best_practices.md for security patternsMulti-stage build that:
Prevents unnecessary files from bloating image:
Orchestration file with:
When the basic script isn't sufficient, consult the reference files:
Read references/python_patterns.md for:
Read references/docker_best_practices.md for:
The dockerize_python.py script provides:
Automatic Detection:
Smart Generation:
Best Practices:
Dependency detection issues:
Large image sizes:
Permission errors:
Module not found in container:
Always inform users of:
docker build -t app-name .docker run app-nameAutomated Python-to-Docker conversion tool. Analyzes Python scripts and generates complete Docker configuration with Pixi (default) or pip (--no-pixi flag). Supports GPU/CUDA with --cuda flag. Automatically generates Apptainer/Singularity conversion files.
Standalone tool for converting Docker images to Apptainer .sif format, generating .def files, and creating conversion scripts. Three modes: convert, def, and script.
Comprehensive guide for Apptainer/Singularity containers in HPC environments, covering Docker-to-.sif conversion, definition files, GPU support, SLURM/HTCondor integration, and best practices for scientific computing.
Comprehensive guide for GPU-accelerated computing with CUDA, covering Pixi features, multi-environment setup (CPU/GPU), Docker integration, framework-specific configs (PyTorch, TensorFlow, JAX), and HTCondor/HPC deployment.
Comprehensive guide to Pixi package manager covering installation, commands, Docker integration, features, and migration from pip.
Comprehensive guide covering image optimization, security, production considerations, networking, and troubleshooting.
Python-specific Docker patterns for different application types, dependency management, configuration, and file system handling.
npx claudepluginhub jasonlo/skill-sommelierGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.