Simple way to pip install torch, vllm, flash-attn, sglang, ....
Project description
๐ AInfra
ไธญๆๆๆกฃ | English
Simple and intelligent way to install PyTorch, vLLM, Flash Attention, SGLang, and other ML/AI libraries with automatic environment detection.
๐ Web Visualization Tool
Don't want to use the command line? Try our web-based visualization tool at:
๐ https://linxueyuan.online/AInfra/
The web interface provides an intuitive way to generate installation commands based on your configuration. Simply select your Python version, CUDA version, and the libraries you need, and get the complete installation script instantly!
๐ Features
- ๐ Environment Detection: Automatically detects your NVIDIA driver, CUDA version, OS, and Python version
- ๐ฆ Smart Installation: Installs the right package versions based on your environment (e.g., CPU vs CUDA for PyTorch)
- โ User Confirmation: Shows installation plan and asks for confirmation before proceeding
- ๐จ Beautiful CLI: Rich terminal output with colored tables and clear formatting
- ๐ Comprehensive Library Support: Supports popular ML/AI libraries including torch, vllm, numpy, flash-attn, and sglang
๐ฅ Installation
pip install ainfra
๐ฏ Quick Start
๐ Check Your Environment
Display your system's environment information:
ainfra info
Example output:
System Information
โโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Operating System โ Ubuntu 22.04.3 LTS โ
โ OS Version โ Linux 5.15.0 โ
โ System Architecture โ x86_64 / AMD64 โ
โ Python Version โ 3.10.12 โ
โ Nvidia Driver Version โ 550.54.15 โ
โ CUDA Driver Version โ 12.4 โ
โโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ List Supported Libraries
View all libraries that AInfra can install:
ainfra list
Example output:
Supported Libraries
โโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Package โ Description โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ torch โ PyTorch - Deep learning framework with GPU acceleration support โ
โ vllm โ vLLM - High-throughput and memory-efficient inference engine for โ
โ โ LLMs โ
โ numpy โ NumPy - Fundamental package for scientific computing with Python โ
โ flash-attn โ Flash Attention - Fast and memory-efficient exact attention โ
โ sglang โ SGLang - Structured Generation Language for LLMs โ
โโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Total: 5 libraries
For detailed information about each library, see SUPPORTED_LIBRARIES.md.
๐ง Install Packages
Install packages based on your local environment with user confirmation:
Install specific packages:
ainfra install torch vllm numpy
Install all supported packages:
ainfra install all
Get help:
ainfra install --help
The install command will:
- Detect your environment (Python version, CUDA version)
- Show the list of packages to be installed
- Ask for your confirmation before proceeding
- Install the packages with appropriate versions based on your environment
๐ก Usage Examples
# Check your system environment
ainfra info
# List all supported libraries
ainfra list
# Install PyTorch (automatically selects CUDA or CPU version)
ainfra install torch
# Install multiple libraries
ainfra install torch vllm numpy
# Install all supported libraries
ainfra install all
๐ ๏ธ Development
This project uses Poetry for dependency management.
๐ฆ Setup
# Install dependencies
poetry install
# Run the CLI
poetry run ainfra info
poetry run ainfra list
poetry run ainfra install torch
๐๏ธ Build
# Build the package
poetry build
# The built package will be in the dist/ directory
๐ Supported Libraries
- torch: PyTorch - Deep learning framework with GPU acceleration support
- vllm: vLLM - High-throughput and memory-efficient inference engine for LLMs
- numpy: NumPy - Fundamental package for scientific computing with Python
- flash-attn: Flash Attention - Fast and memory-efficient exact attention
- sglang: SGLang - Structured Generation Language for LLMs
See SUPPORTED_LIBRARIES.md for detailed information.
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
๐ License
MIT License. See LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ainfra-0.1.2.tar.gz.
File metadata
- Download URL: ainfra-0.1.2.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.11.5 Darwin/25.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ec8c19cab5bf25aacf628690c39a70c74e7e999528976f10e34edbf997e0c90
|
|
| MD5 |
7df690337a37f84f6a160ac27e474856
|
|
| BLAKE2b-256 |
6739a3701a68ec846b886fe03a82bb677b46317d8b86232bf60ffde6d1662575
|
File details
Details for the file ainfra-0.1.2-py2.py3-none-any.whl.
File metadata
- Download URL: ainfra-0.1.2-py2.py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.11.5 Darwin/25.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10faa103c8bdff3de7211620b7f163d8495da0b43d77109c8d1f7d0cd4540283
|
|
| MD5 |
2cbf9e960cd78b2105b45a4272c20cf2
|
|
| BLAKE2b-256 |
7e97ff166dacb830597e1fe824a903a14bb67bd47631bdea4941544a0ed4e1df
|