This repository is a collection of declarative configuration files used to manage my Python development environments across multiple devices. Adopting the "Infrastructure as Code" philosophy, I ensure high consistency across physical machines, remote servers, and containers.
Guiding Principle: Rebuild over Patch
When dependencies change, I follow the "Destroy -> Rebuild" principle. Manual incremental modifications via CLI are discouraged. All changes must be implemented within configuration files to guarantee idempotency and environment purity.
Important Update: This repository is currently undergoing an architectural migration. Following a deep evaluation, I have decided to shift the focus of environment management from traditional Conda/Pip to a modern, declarative toolchain centered around uv.
- Extreme Performance: Having understood zero-copy linking and global caching mechanisms, I believe
uvwill become the de facto management standard for the Python community. - Deterministic Reproduction: Conda and Pip struggle to achieve perfect reproduction via config files alone. The
uvecosystem finally solves idempotent builds through modern lockfile mechanisms. - Scientific Computing Compatibility: To maintain compatibility with research requirements, I use pixi for Conda-protocol support. Other tools remain under observation.
This repository employs Declarative Environment Management: whenever a configuration changes, the environment is destroyed and rebuilt from scratch.
| Tool | Status | Use Case / Advantages |
|---|---|---|
| uv (Preferred) | Active | Modern standard, blazing fast, supports pyproject.toml; used for personal projects and production. |
| pixi | Transition | Bridge solution for handling complex scientific computing binary dependencies. |
| conda | Legacy | Retained for research task compatibility; no longer actively updated. |
| pip/venv | Legacy | Basic universal solution; no longer actively updated. |
| shell | Maintenance | Used for full source-code compilation or system-level initialization. |
I maintain a series of base configurations tailored for different workflows:
- agent_env: Agent development environment centered on LangChain and LangGraph.
- dl_env: Deep Learning environment, focused on PyTorch model design and training.
- ds_env: Data Science research, including analysis and visualization.
- llm_env: Dedicated environment for LLM execution, deployment, and training.
- spider_env: Web crawling and automation tools.
- web_env: Base environment for backend development.
For project-specific configurations, please refer to the
conda_specific_projects/directory.
# Sync project dependencies using uv
uv sync# Initialize environment using pixi
pixi shell -e dl_envThe following are examples based on conda. While Conda has a long-standing influence in scientific computing, I plan to migrate these to uv and pixi in the future.
First, list the existing virtual environments.
conda env list
If an old environment exists, remove it.
conda deactivate
conda remove --name ${env_name} --allRebuild the environment using the configuration file.
conda env create -f ./environment.yaml
Finally, verify that the dependencies are correctly installed.
conda activate ${env_name}
conda listThese commands are also documented in the
conda_environments/conda_run.shfile.
- Introduce
uvto replace nativepip. - Introduce
pixifor declarative management of research environments. - Migrate all configurations to
pyproject.tomlandpixi.toml. - Integrate Remote Development based on Docker Dev Containers for a "total solution."
Other toolkits I maintain that you might find useful:
- Python-Environment-Configurations : Environment configurations for Python toolchains (Pip, Conda, UV, etc.).
- Deployment-Toolkit : A collection of raw OS scripts (Shell/PowerShell).
- CLI-Wrapper : A safer, more user-friendly Python wrapper for complex CLI tools.