Parallax Windows CLI is a development environment configuration tool for Windows platform, providing automatic detection and installation of WSL2, CUDA toolkit, development tools, and more. This project adopts modern C++ architecture and implements one-click deployment through NSIS-built Windows installer, supporting WSL2 + Ubuntu development environment configuration.
- Automatic Check: Comprehensive checking of Windows environment, WSL2, NVIDIA drivers, and other components
- One-Click Installation: Automatic installation and configuration of WSL2, CUDA toolkit, development tools, etc.
- Smart Detection: Support for NVIDIA GPU detection and CUDA toolkit checking
- System Requirements: Minimum support for RTX 3060 Ti, recommended RTX 4090 or higher configuration
- Smart Detection: Automatic detection of system environment and hardware configuration
- One-Click Installation: Automatic installation of WSL2, CUDA toolkit, development tools, etc.
- GPU Support: Complete NVIDIA GPU detection and driver verification
- Real-time Feedback: Support for real-time viewing of installation progress and status
- Command Execution: Complete WSL2 command execution support
- Real-time Output: Real-time stdout/stderr output for WSL command execution
- Interrupt Support: Support for Ctrl+C interruption of running WSL commands
- Proxy Synchronization: Automatic synchronization of system proxy configuration to WSL environment
- Flexible Configuration: Support for multiple configurations including proxy, WSL distribution, installation sources, etc.
- Dynamic Updates: Configuration changes automatically synchronized to related components
- Reset Function: One-click reset of all configurations to default state
- Secure Storage: Secure storage and access control for configuration files
- Template Method Pattern: Unified command execution flow and error handling
- CRTP Technology: Compile-time polymorphism with zero runtime overhead
- Command Pattern: Extensible command registration and execution mechanism
- Strategy Pattern: Flexible environment requirements and checking strategies
Parallax Windows CLI adopts modern C++ design patterns and mainly contains the following core components:
- Location:
src/parallax/cli/ - Functions:
- Unified command parsing and execution framework
- Command base class based on template method pattern
- Support for standardized parameter validation, environment preparation, and execution flow
- Supported Commands: check, install, config, run, join, chat, cmd
- Location:
src/parallax/environment/ - Architecture Features:
- Modular design with separation of concerns
- Composite pattern managing multiple specialized components
- Unified checking and installation interface
- Core Components:
base_component: Basic interface and execution contextcommand_executor: Unified command executorsystem_checker: System checker (OS version, NVIDIA GPU, NVIDIA driver, BIOS virtualization)windows_feature_manager: Windows feature manager (WSL2, virtual machine platform, WSL package, WSL2 kernel, Ubuntu)software_installer: Software installer (CUDA toolkit check, Rust Cargo, Ninja build tool, pip upgrade, Parallax project)
- State Management: Support for success, failure, skip, and warning states
- Location:
src/parallax/config/ - Functions:
- Unified configuration file management
- Support for dynamic configuration loading and updating
- Configuration validation and default value handling
- Location:
src/parallax/utils/ - Functions:
utils: WSL command building, string conversion, GPU detection, file operationsprocess: Process management and real-time output handling, supporting callbacks and interruptionwsl_process: WSL-specific process management, supporting real-time output and encoding conversion
- Location:
src/parallax/tinylog/ - Functions:
- High-performance asynchronous logging system
- Support for log rotation and size limits
- Multi-level log output and filtering
- Operating System: Windows 10 Version 2004 (Build 19041) or Windows 11
- Architecture: x86_64
- Permissions: Administrator privileges (for WSL2 and Docker installation)
- Memory: Minimum 16GB RAM, recommended 32GB or higher
- Storage: Minimum 50GB available space
- GPU: NVIDIA RTX 3060 Ti or higher configuration
- VRAM: Minimum 8GB VRAM, recommended 24GB or higher
- CPU: Intel i5-8400 or AMD Ryzen 5 2600 and above (recommended)
- Network: Stable internet connection (for downloading images and models)
- WSL2: Windows Subsystem for Linux 2
- Ubuntu: Ubuntu distribution on WSL2 (default Ubuntu-24.04)
- NVIDIA Driver: Latest driver supporting CUDA 12.x
- CUDA Toolkit: CUDA Toolkit 12.8 or 12.9 version (needs to be pre-installed)
- Rust Cargo: Rust package manager and build tool
- Ninja: Fast build tool
Download the latest installer from the Release page:
parallax checkparallax installparallax config proxy_url "http://127.0.0.1:7890"# Verify all environment components
parallax check
# Start Parallax inference server (optional)
parallax run
# Access chat interface (optional)
parallax chatCheck environment requirements and component status
parallax check [--help|-h]Install required environment components
parallax install [--help|-h]Configuration management command
# View all configurations
parallax config list
# Set configuration item
parallax config <key> <value>
# Delete configuration item
parallax config <key> ""
# Reset all configurations
parallax config reset
# View help
parallax config --helpRun Parallax inference server directly in WSL
parallax run [args...]Join distributed inference cluster as a node
parallax join [args...]Access chat interface from non-scheduler computer
parallax chat [args...]Execute commands in WSL or Python virtual environment
parallax cmd [--venv] <command> [args...]Command Descriptions:
run: Start Parallax inference server directly in WSL. You can pass any arguments supported byparallax runcommand. Examples:parallax run -m Qwen/Qwen3-0.6B,parallax run --port 8080join: Join distributed inference cluster as a worker node. You can pass any arguments supported byparallax joincommand. Examples:parallax join -m Qwen/Qwen3-0.6B,parallax join -s scheduler-addrchat: Access chat interface from any non-scheduler computer. You can pass any arguments supported byparallax chatcommand. Examples:parallax chat(local network),parallax chat -s scheduler-addr(public network),parallax chat --host 0.0.0.0(allow external access). After launching, visit http://localhost:3002 in your browser.cmd: Pass-through commands to WSL environment, supports--venvoption to run in parallax project's Python virtual environment
Main Configuration Items:
proxy_url: Network proxy address (supports http, socks5, socks5h)wsl_linux_distro: WSL Linux distribution (default Ubuntu-24.04)wsl_installer_url: WSL installer download URLwsl_kernel_url: WSL2 kernel update package download URLparallax_git_repo_url: Parallax project Git repository URL (default: https://github.com/GradientHQ/parallax.git)
- Visual Studio 2022: With C++ desktop development workload
- CMake 3.20+: For building C++ projects
- NSIS 3.08+: For creating Windows installer
Execute in project root directory:
cd src
mkdir build && cd build
cmake ../parallax -A x64
cmake --build . --config ReleaseGenerated executable is located at: src/build/x64/Release/parallax.exe
# 1. Create installation file directory
mkdir installer\FilesToInstall
# 2. Copy generated executable
copy src\build\x64\Release\parallax.exe installer\FilesToInstall\
# 3. Build installer
call installer\build-nim-nozip.batParallax is configured through configuration files, main configuration items include:
# WSL related configuration
wsl_installer_url=https://github.com/microsoft/WSL/releases/download/2.4.13/wsl.2.4.13.0.x64.msi
wsl_kernel_url=https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
wsl_linux_distro=Ubuntu-24.04
# Parallax project configuration
parallax_git_repo_url=https://github.com/GradientHQ/parallax.git
# Network proxy configuration (optional)
proxy_url=http://127.0.0.1:7890
-
Environment Check Failed
- Ensure running commands with administrator privileges
- Check if Windows version meets requirements
- Verify NVIDIA GPU and driver installation
-
WSL2 Installation Failed
- Enable Windows features: Virtual Machine Platform and WSL
- Check if virtualization is enabled in BIOS
- Ensure system is updated to the latest version
-
CUDA Toolkit Check Failed
- Check if NVIDIA driver is correctly installed
- Confirm CUDA Toolkit is correctly installed
- Verify CUDA version meets requirements (12.8 or 12.9)
-
Parallax Project Installation Failed
- Check Git repository access permissions
- Verify proxy configuration is correct
- Ensure sufficient storage space in WSL2
-
Network Connection Issues
- Configure correct proxy settings
- Check firewall and network policies
- Verify software package repository access permissions
- Main Program Log:
parallax.log(Program running directory: C:\Program Files (x86)\Gradient Parallax\parallax.log) - Detailed Debugging: View detailed output of command execution
# Check environment status (recommended)
parallax check
# View detailed configuration
parallax config list
# Start inference server test
parallax run
# Access chat interface test
parallax chat
# Execute commands in WSL
parallax cmd "python --version"
# Manual verification of specific components (optional)
wsl --list --verbose # WSL status
nvidia-smi # GPU status- All long-running commands support real-time output
- Support for Ctrl+C interruption
- Automatic handling of output encoding conversion
- Automatic detection of proxy configuration changes
- WSL network environment adaptation
- Automatic detection of NVIDIA GPU models
- Verification of GPU driver and CUDA compatibility
- Support for mainstream NVIDIA GPU architectures
- Comprehensive environment checking mechanism
- Detailed error messages and suggestions
- Graceful failure recovery handling
- Create new command class in
src/parallax/cli/commands/directory - Inherit appropriate base class (BaseCommand, WSLCommand, AdminCommand)
- Implement required virtual functions
- Register new command in
command_parser.cpp
// Example: Adding new check command
class NewCheckCommand : public WSLCommand<NewCheckCommand> {
public:
std::string GetName() const override { return "newcheck"; }
std::string GetDescription() const override {
return "New check functionality";
}
CommandResult ExecuteImpl(const CommandContext& context) {
// Implement specific logic
return CommandResult::Success;
}
};- Choose appropriate component class based on functionality type (SystemChecker, WindowsFeatureManager, SoftwareInstaller)
- Inherit
BaseEnvironmentComponentand implementIEnvironmentComponentinterface - Register new component in main
EnvironmentInstaller - Update related error handling and user prompts
// Example: Adding new system check component
class NewSystemChecker : public BaseEnvironmentComponent {
public:
explicit NewSystemChecker(std::shared_ptr<ExecutionContext> context);
ComponentResult Check() override;
ComponentResult Install() override;
EnvironmentComponent GetComponentType() const override;
std::string GetComponentName() const override;
};- Define new configuration keys in
config_manager.h - Add default values and validation logic in
config_manager.cpp - Update help information for configuration commands
parallax_win/
├── src/
│ └── parallax/
│ ├── cli/ # Command line interface
│ │ ├── commands/ # Specific command implementations
│ │ │ ├── base_command.h
│ │ │ ├── check_command.cpp/.h
│ │ │ ├── install_command.cpp/.h
│ │ │ ├── config_command.cpp/.h
│ │ │ ├── cmd_command.cpp/.h
│ │ │ └── model_commands.cpp/.h # run and join commands
│ │ ├── command_parser.h # Command parser
│ │ └── command_parser.cpp
│ ├── environment/ # Environment installer (modularized after refactoring)
│ │ ├── environment_installer.h/.cpp # Main controller
│ │ ├── base_component.h/.cpp # Basic interface and context
│ │ ├── command_executor.h/.cpp # Command executor
│ │ ├── system_checker.h/.cpp # System checker
│ │ ├── windows_feature_manager.h/.cpp # Windows feature manager
│ │ ├── windows_feature_manager2.cpp # Windows feature manager (continued)
│ │ ├── software_installer.h/.cpp # Software installer
│ │ └── software_installer2.cpp # Software installer (continued)
│ ├── config/ # Configuration management
│ │ ├── config_manager.h
│ │ └── config_manager.cpp
│ ├── utils/ # Utility library
│ │ ├── utils.h/.cpp # General utility functions
│ │ ├── process.h/.cpp # Process management
│ │ └── wsl_process.h/.cpp # WSL process management
│ ├── tinylog/ # Logging system
│ │ ├── tinylog.h
│ │ └── tinylog.cpp
│ ├── main.cpp # Program entry point
│ └── CMakeLists.txt # Build configuration
├── installer/ # NSIS installer
│ ├── SetupScripts/
│ └── Output/
├── parallax_config.txt # Default configuration
└── README.md # This document
Please refer to the LICENSE file for license information.
- Fork this project
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Create a Pull Request
If you have any questions or suggestions, please contact us through:
- Create an Issue to report problems
- Submit a Pull Request to contribute code
- Contact the development team for support
Note: Parallax is a high-performance distributed inference framework optimized for NVIDIA GPUs. Please ensure your hardware configuration meets the minimum requirements and that relevant drivers are correctly installed before use.