-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add automated Ubuntu/Debian installation script with documentation #407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add automated Ubuntu/Debian installation script with documentation #407
Conversation
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds automated installation support for Ubuntu/Debian Linux systems, providing a streamlined setup experience with comprehensive error handling and system optimization.
- Adds a fully automated bash installation script (
install-ubuntu.sh) with interactive setup options - Includes detailed German documentation (
INSTALLATION-DEUTSCH.md) and comprehensive English guide (docs/INSTALLATION-UBUNTU.md) - Updates the main README to highlight the new automated installation option
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| install-ubuntu.sh | New automated installation script with Docker/local setup options, GPU detection, and system resource checking |
| docs/INSTALLATION-UBUNTU.md | Comprehensive German-language installation guide with troubleshooting and performance tips |
| INSTALLATION-DEUTSCH.md | Shorter German quick-start guide with common issues and solutions |
| README.md | Updated to add automated Ubuntu/Debian installation as Option 1 in the installation section |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| install_python() { | ||
| print_section "Installing Python 3.12+" | ||
|
|
||
| if command -v python3 &> /dev/null; then | ||
| PYTHON_VERSION=$(python3 --version | cut -d' ' -f2) | ||
| PYTHON_MAJOR=$(echo $PYTHON_VERSION | cut -d'.' -f1) | ||
| PYTHON_MINOR=$(echo $PYTHON_VERSION | cut -d'.' -f2) | ||
|
|
||
| if [ "$PYTHON_MAJOR" -ge 3 ] && [ "$PYTHON_MINOR" -ge 12 ]; then |
Copilot
AI
Oct 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version comparison logic will fail for Python 3.9 vs 3.12 because the comparison operators -ge expect integers, but the cut command might not handle all version formats correctly (e.g., '3.12.0' vs '3.9.16'). This could cause incorrect version detection. Consider using proper version comparison or ensuring the extracted values are valid integers.
| install_python() { | |
| print_section "Installing Python 3.12+" | |
| if command -v python3 &> /dev/null; then | |
| PYTHON_VERSION=$(python3 --version | cut -d' ' -f2) | |
| PYTHON_MAJOR=$(echo $PYTHON_VERSION | cut -d'.' -f1) | |
| PYTHON_MINOR=$(echo $PYTHON_VERSION | cut -d'.' -f2) | |
| if [ "$PYTHON_MAJOR" -ge 3 ] && [ "$PYTHON_MINOR" -ge 12 ]; then | |
| # Compare two version strings, returns 0 if $1 >= $2 | |
| version_ge() { | |
| # Usage: version_ge "3.12.0" "3.12" | |
| # Returns 0 if first version >= second version | |
| awk -v v1="$1" -v v2="$2" 'BEGIN { | |
| split(v1, a, "."); | |
| split(v2, b, "."); | |
| for (i=1; i<=2; i++) { | |
| if ((a[i]+0) > (b[i]+0)) exit 0; | |
| if ((a[i]+0) < (b[i]+0)) exit 1; | |
| } | |
| exit 0; | |
| }' | |
| } | |
| install_python() { | |
| print_section "Installing Python 3.12+" | |
| if command -v python3 &> /dev/null; then | |
| PYTHON_VERSION=$(python3 --version | cut -d' ' -f2) | |
| REQUIRED_VERSION="3.12" | |
| if version_ge "$PYTHON_VERSION" "$REQUIRED_VERSION"; then |
| PYTHON_MAJOR=$(echo $PYTHON_VERSION | cut -d'.' -f1) | ||
| PYTHON_MINOR=$(echo $PYTHON_VERSION | cut -d'.' -f2) | ||
|
|
||
| if [ "$PYTHON_MAJOR" -ge 3 ] && [ "$PYTHON_MINOR" -ge 12 ]; then |
Copilot
AI
Oct 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version check logic is incorrect. The condition checks if PYTHON_MAJOR >= 3 AND PYTHON_MINOR >= 12, which means Python 4.0 would incorrectly fail this check (4 >= 3 is true, but 0 >= 12 is false). It should be (PYTHON_MAJOR > 3) OR (PYTHON_MAJOR == 3 AND PYTHON_MINOR >= 12).
| if [ "$PYTHON_MAJOR" -ge 3 ] && [ "$PYTHON_MINOR" -ge 12 ]; then | |
| if [ "$PYTHON_MAJOR" -gt 3 ] || ( [ "$PYTHON_MAJOR" -eq 3 ] && [ "$PYTHON_MINOR" -ge 12 ] ); then |
| fi | ||
|
|
||
| # Ask for optimization settings | ||
| if [ "$TOTAL_RAM" -lt 16 ]; then |
Copilot
AI
Oct 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable TOTAL_RAM is set as a local variable in the check_system_resources function (line 96) but is being accessed in the configure_environment function without being declared as global or passed as a parameter. This will result in an empty comparison, potentially causing the condition to always fail or produce an error.
| print_section "Setting Up Docker Installation" | ||
|
|
||
| # Check for GPU and ask user | ||
| if [ "$HAS_GPU" = true ]; then |
Copilot
AI
Oct 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable HAS_GPU is set as a local variable in the check_system_resources function (lines 116, 119) but is being accessed in the setup_docker_installation function without being declared as global or passed as a parameter. This will result in the GPU detection not working correctly across functions.
| # Add Docker's official GPG key | ||
| sudo mkdir -p /etc/apt/keyrings | ||
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg | ||
|
|
||
| # Set up the repository | ||
| echo \ | ||
| "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ |
Copilot
AI
Oct 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For Debian systems, the script uses Ubuntu's Docker repository URL. While this might work in many cases, it could cause issues on pure Debian systems. Consider checking the OS type and using the appropriate repository URL: https://download.docker.com/linux/debian/gpg for Debian.
| # Add Docker's official GPG key | |
| sudo mkdir -p /etc/apt/keyrings | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg | |
| # Set up the repository | |
| echo \ | |
| "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ | |
| # Detect OS type and set Docker repo variables | |
| if [ "$(lsb_release -is 2>/dev/null)" = "Debian" ] || grep -qi '^ID=debian' /etc/os-release; then | |
| DOCKER_GPG_URL="https://download.docker.com/linux/debian/gpg" | |
| DOCKER_REPO_URL="https://download.docker.com/linux/debian" | |
| else | |
| DOCKER_GPG_URL="https://download.docker.com/linux/ubuntu/gpg" | |
| DOCKER_REPO_URL="https://download.docker.com/linux/ubuntu" | |
| fi | |
| # Add Docker's official GPG key | |
| sudo mkdir -p /etc/apt/keyrings | |
| curl -fsSL "$DOCKER_GPG_URL" | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg | |
| # Set up the repository | |
| echo \ | |
| "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] $DOCKER_REPO_URL \ |
|
|
||
| # Set up the repository | ||
| echo \ | ||
| "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ |
Copilot
AI
Oct 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For Debian systems, the script uses Ubuntu's Docker repository URL. This hardcoded 'ubuntu' path should be dynamically set based on the detected OS (from the $OS variable set in check_ubuntu_version) to properly support both Ubuntu and Debian as advertised.
| "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ | |
| "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/${OS} \ |
| @@ -0,0 +1,362 @@ | |||
| # Second-Me Installation Guide für Ubuntu/Debian | |||
Copilot
AI
Oct 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The title mixes English ('Installation Guide') with German ('für'). For consistency, either use fully English 'Second-Me Installation Guide for Ubuntu/Debian' or fully German 'Second-Me Installationsanleitung für Ubuntu/Debian'.
| # Second-Me Installation Guide für Ubuntu/Debian | |
| # Second-Me Installationsanleitung für Ubuntu/Debian |
|
@copilot open a new pull request to apply changes based on the comments in this thread |
1 similar comment
|
@copilot open a new pull request to apply changes based on the comments in this thread |
This commit adds a comprehensive, automated installation system for Ubuntu/Debian users: ## New Files: - install-ubuntu.sh: Fully automated installation script with: * Interactive installation type selection (Docker/Local/Both) * Automatic system requirement checks (RAM, disk space, GPU) * Intelligent dependency installation * GPU/CUDA support detection and configuration * Comprehensive error handling and logging * Progress indicators and colored output * Convenience startup/stop scripts generation - INSTALLATION-DEUTSCH.md: German quick-start guide with: * Simple step-by-step instructions * Common troubleshooting solutions * Performance optimization tips * Training monitoring guidance - docs/INSTALLATION-UBUNTU.md: Detailed English documentation with: * Complete installation guide * System requirements breakdown * Extensive troubleshooting section * Performance tuning recommendations * Useful command reference ## Modified Files: - README.md: Added reference to automated installation option ## Features: ✅ One-command installation: curl | bash ✅ Detects Ubuntu/Debian automatically ✅ Checks system resources (RAM, disk, GPU) ✅ Installs all required dependencies ✅ Offers Docker or local installation ✅ Sets up NVIDIA Container Toolkit for GPU support ✅ Creates convenience scripts (start/stop) ✅ Optimizes for low-memory systems ✅ Comprehensive logging to install-ubuntu.log ✅ Beautiful, colored terminal output This solves common installation pain points reported by users, especially around training integration and dependency management. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
0ce1cea to
ce15326
Compare
|
@copilot open a new pull request to apply changes based on the comments in this thread |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit adds a comprehensive, automated installation system for Ubuntu/Debian users:
New Files:
install-ubuntu.sh: Fully automated installation script with:
INSTALLATION-DEUTSCH.md: German quick-start guide with:
docs/INSTALLATION-UBUNTU.md: Detailed English documentation with:
Modified Files:
Features:
✅ One-command installation: curl | bash
✅ Detects Ubuntu/Debian automatically
✅ Checks system resources (RAM, disk, GPU)
✅ Installs all required dependencies
✅ Offers Docker or local installation
✅ Sets up NVIDIA Container Toolkit for GPU support ✅ Creates convenience scripts (start/stop)
✅ Optimizes for low-memory systems
✅ Comprehensive logging to install-ubuntu.log
✅ Beautiful, colored terminal output
This solves common installation pain points reported by users, especially around training integration and dependency management.
🤖 Generated with Claude Code