{"id":31767907,"url":"https://github.com/webdevtodayjason/home-lab","last_synced_at":"2026-02-25T07:45:03.229Z","repository":{"id":317725793,"uuid":"1068532323","full_name":"webdevtodayjason/home-lab","owner":"webdevtodayjason","description":"My LLM Home Lab LLM Setup for a 4090 JupyterLab and more. ","archived":false,"fork":false,"pushed_at":"2025-10-02T16:00:07.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-02T18:06:06.703Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webdevtodayjason.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-02T14:23:05.000Z","updated_at":"2025-10-02T16:00:11.000Z","dependencies_parsed_at":"2025-10-06T07:04:55.383Z","dependency_job_id":null,"html_url":"https://github.com/webdevtodayjason/home-lab","commit_stats":null,"previous_names":["webdevtodayjason/home-lab"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/webdevtodayjason/home-lab","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webdevtodayjason%2Fhome-lab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webdevtodayjason%2Fhome-lab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webdevtodayjason%2Fhome-lab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webdevtodayjason%2Fhome-lab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webdevtodayjason","download_url":"https://codeload.github.com/webdevtodayjason/home-lab/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webdevtodayjason%2Fhome-lab/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002400,"owners_count":26083375,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-10T01:48:44.688Z","updated_at":"2025-10-10T01:48:56.878Z","avatar_url":"https://github.com/webdevtodayjason.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 LLM Admin Panel \u0026 AI Development Environment\n\nA comprehensive web-based admin panel for managing multiple LLM-related services with real-time status monitoring and AI development tools.\n\n## 🏗️ System Architecture\n\nThis setup provides a complete AI development environment with:\n- **Web-based Admin Panel**: Flask dashboard for service management\n- **AI Development Tools**: JupyterLab, Streamlit, Gradio interfaces\n- **Local LLM Services**: Ollama API with multiple models\n- **Real-time Monitoring**: GPU metrics, service status, system health\n- **External Access**: All services accessible remotely via network IP\n\n## 📱 Services Overview\n\n| Service | Port | Purpose | External URL | Status |\n|---------|------|---------|--------------|--------|\n| **Admin Panel** | 5000 | Main dashboard \u0026 control | http://10.11.1.105:5000 | ✅ |\n| **JupyterLab** | 8888 | AI/ML notebooks \u0026 development | http://10.11.1.105:8888 | ✅ |\n| **Gradio Chat** | 7860 | Interactive LLM chat interface | http://10.11.1.105:7860 | ✅ |\n| **Streamlit** | 8501 | GPU monitoring \u0026 model management | http://10.11.1.105:8501 | ✅ |\n| **Open WebUI** | 3000 | ChatGPT-like web interface | http://10.11.1.105:3000 | ✅ |\n| **Wan2.2 Video Gen** | 7870 | AI video generation (T2V \u0026 I2V) | http://10.11.1.105:7870 | ✅ |\n| **Ollama API** | 11434 | Local LLM inference service | http://10.11.1.105:11434 | ✅ |\n\n## 🖥️ Server Configuration\n\n### Hardware Environment\n- **OS**: Ubuntu 22.04 LTS\n- **GPU**: NVIDIA GeForce RTX 4090 (24GB VRAM)\n- **CPU**: Multi-core processor\n- **RAM**: 32GB+ recommended\n- **Storage**: 500GB+ SSD space\n- **Network**: Static IP: 10.11.1.105\n\n### Software Stack\n- **Python**: 3.12+ (Miniconda/Anaconda)\n- **CUDA**: 13.0+ drivers\n- **Docker**: Not used (native installation)\n- **Web Server**: Flask development server + individual service servers\n- **Process Manager**: Systemd (Ollama), bash scripts (others)\n\n## 🛠️ Complete Setup Instructions\n\n### 1. Clone Repository\n\n```bash\ngit clone https://github.com/webdevtodayjason/home-lab.git\ncd home-lab\n```\n\n### 2. System Prerequisites\n\n```bash\n# Update system\nsudo apt update \u0026\u0026 sudo apt upgrade -y\n\n# Install essential packages\nsudo apt install -y curl wget git build-essential python3-pip lsof\n\n# Install NVIDIA drivers (if not already installed)\nsudo ubuntu-drivers autoinstall\nsudo reboot\n```\n\n### 3. Install Miniconda\n\n```bash\n# Download and install Miniconda\nwget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh\nchmod +x Miniconda3-latest-Linux-x86_64.sh\n./Miniconda3-latest-Linux-x86_64.sh\nsource ~/.bashrc\n```\n\n### 4. Install Ollama\n\n```bash\n# Install Ollama\ncurl -fsSL https://ollama.ai/install.sh | sh\n\n# Enable and start Ollama service\nsudo systemctl enable ollama\nsudo systemctl start ollama\n\n# Download models\nollama pull llama3.2:3b\nollama pull gemma2:27b\nollama pull qwen2.5vl:latest\nollama pull deepseek-r1:latest\n\n# Download Wan2.2 models\nmkdir -p /home/devops/models\ncd /home/devops/models\nhuggingface-cli download Wan-AI/Wan2.2-TI2V-5B --local-dir ./Wan2.2-TI2V-5B\n```\n\n### 5. Python Environment Setup\n\n```bash\n# Create conda environment\nconda create -n llm-env python=3.12 -y\nconda activate llm-env\n\n# Install core packages\npip install flask jupyter jupyterlab gradio streamlit\npip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121\npip install transformers datasets accelerate\npip install nvidia-ml-py3 psutil requests\n\n# Install Open WebUI\npip install open-webui\n\n# Install DiffSynth-Studio for Wan2.2 Video Generation\ncd /home/devops\ngit clone https://github.com/modelscope/DiffSynth-Studio.git\ncd DiffSynth-Studio\npip install -e .\n```\n\n### 6. Configure Services\n\n```bash\n# Make scripts executable\nchmod +x examples/launch_interfaces.sh\nchmod +x examples/stop_interfaces.sh\n\n# Update IP addresses in admin panel\n# Edit app.py if your server IP is different from 10.11.1.105\n```\n\n## 🚀 Starting the Environment\n\n### Method 1: Admin Panel (Recommended)\n```bash\n# Start admin panel\npython app.py\n\n# Access dashboard at: http://10.11.1.105:5000\n# Login: admin / Dragon@123!@#\n# Click \"Start All\" button\n```\n\n### Method 2: Manual Service Launch\n```bash\n# Start all services\ncd examples\n./launch_interfaces.sh\n\n# Start admin panel separately\ncd ../\npython app.py\n```\n\n## 🔧 AI Development Environment\n\n### JupyterLab Features\n- **CUDA Support**: Full GPU acceleration for PyTorch/TensorFlow\n- **Pre-installed Libraries**: \n  - PyTorch, Transformers, Datasets\n  - Accelerate, PEFT, BitsAndBytes\n  - Pandas, NumPy, Matplotlib, Seaborn\n- **Model Development**: Fine-tuning, inference, evaluation\n- **Data Science**: Full notebook environment with plotting\n- **External Access**: No authentication, direct external connections\n\n### Available Models (via Ollama)\n```bash\n# List installed models\nollama list\n\n# Available models:\n- llama3.2:3b (3.2B params) - Fast inference\n- gemma2:27b (27.2B params) - High quality\n- qwen2.5vl:latest (Vision + Language)\n- deepseek-r1:latest (Code generation)\n- llama3.1:8b (General purpose)\n```\n\n### Wan2.2 Video Generation Features\n- **Text-to-Video**: Generate videos from text prompts\n- **Image-to-Video**: Animate static images into videos\n- **High Quality**: 720P @ 24fps output\n- **Efficient Model**: TI2V-5B optimized for RTX 4090\n- **Advanced VAE**: 16×16×4 compression ratio\n- **Memory Optimized**: ~12-16GB VRAM usage\n- **Generation Time**: 2-5 minutes per video\n\n```bash\n# Video generation examples:\n# Text-to-Video: \"A dragon flying over a castle\"\n# Image-to-Video: Upload image + \"Make it come alive\"\n# Resolution: Up to 1280x720 @ 24fps\n# Frames: 8-48 frames per video\n```\n\n### Development Workflow\n1. **Access JupyterLab**: http://10.11.1.105:8888\n2. **Create notebooks** for model experimentation\n3. **Use Gradio** for quick UI prototyping\n4. **Monitor GPU** via Streamlit dashboard\n5. **Chat testing** through Open WebUI\n6. **API access** via Ollama endpoint\n\n## 📂 Project Structure\n\n```\nhome-lab/\n├── README.md                 # This documentation\n├── .gitignore               # Git ignore rules\n├── app.py                   # Flask admin panel server\n├── templates/\n│   ├── index.html          # Dashboard HTML template  \n│   └── login.html          # Login page template\n├── examples/\n│   ├── README.md           # Services documentation\n│   ├── launch_interfaces.sh # Start all services script\n│   ├── stop_interfaces.sh  # Stop all services script\n│   ├── gradio_chat_app.py  # Gradio chat interface\n│   ├── streamlit_dashboard.py # GPU monitoring dashboard\n│   ├── vllm_example.ipynb  # Sample Jupyter notebook\n│   └── Untitled.ipynb     # Development notebook\n└── nginx.conf              # Nginx configuration (optional)\n```\n\n## 🎯 Key Features \u0026 Fixes\n\n### Admin Panel Features\n- ✅ **Real-time Status Monitoring**: Live service health checks\n- ✅ **Service Management**: Start/stop all services with one click\n- ✅ **GPU Monitoring**: Temperature, utilization, memory usage\n- ✅ **System Info**: Uptime, timestamps, service counts\n- ✅ **Auto-refresh**: 30-second intervals with countdown\n- ✅ **Responsive Design**: Dark theme, mobile-friendly\n\n### Technical Improvements\n- ✅ **Fixed Status Detection**: Handles both IPv4/IPv6 bindings\n- ✅ **Color Coding**: Green (online) / Red (offline) indicators\n- ✅ **JupyterLab Config**: Resolved theme errors, enabled external access  \n- ✅ **Port Detection**: Reliable `ss -tlnp` parsing\n- ✅ **External Access**: All services bind to 0.0.0.0\n\n## 🔒 Security Configuration\n\n### Current Setup (Development)\n- **Admin Panel**: Password protected (admin / Dragon@123!@#)\n- **JupyterLab**: No authentication (external access)\n- **Other Services**: No authentication\n- **Firewall**: Disabled (UFW inactive)\n- **Network**: All services accessible externally\n\n### Production Recommendations\n```bash\n# Enable firewall with specific ports\nsudo ufw enable\nsudo ufw allow 22    # SSH\nsudo ufw allow 5000  # Admin Panel\nsudo ufw allow 8888  # JupyterLab (restrict if needed)\n\n# Change default passwords\n# Edit app.py: ADMIN_PASSWORD = 'your-secure-password'\n```\n\n## 🐛 Troubleshooting\n\n### Service Won't Start\n```bash\n# Check port usage\nss -tlnp | grep :PORT\n\n# Kill existing processes\npkill -f jupyter\npkill -f gradio\npkill -f streamlit\npkill -f open-webui\n\n# Check logs\ntail -f app.log\n```\n\n### External Access Issues\n```bash\n# Test local access first\ncurl http://localhost:8888\n\n# Check binding address\nss -tlnp | grep :8888\n# Should show: 0.0.0.0:8888 (not 127.0.0.1:8888)\n\n# Test external access\ncurl -I http://10.11.1.105:8888\n```\n\n### GPU Not Detected\n```bash\n# Verify NVIDIA drivers\nnvidia-smi\n\n# Check CUDA installation\nnvcc --version\n\n# Test PyTorch GPU access\npython -c \"import torch; print(torch.cuda.is_available())\"\n```\n\n## 📊 Resource Requirements\n\n### Minimum Requirements\n- **CPU**: 8 cores, 3.0GHz+\n- **RAM**: 16GB\n- **GPU**: RTX 3080 (10GB VRAM)\n- **Storage**: 100GB free space\n- **Network**: 100Mbps\n\n### Recommended (Current Setup)\n- **CPU**: 16+ cores, 4.0GHz+\n- **RAM**: 32GB+  \n- **GPU**: RTX 4090 (24GB VRAM)\n- **Storage**: 1TB NVMe SSD\n- **Network**: Gigabit Ethernet\n\n## 🚀 Advanced Usage\n\n### Adding New Services\n1. Edit `SERVICES_CONFIG` in `app.py`\n2. Add service startup to `launch_interfaces.sh`\n3. Add service cleanup to `stop_interfaces.sh`\n4. Update this README\n\n### Custom Models\n```bash\n# Add custom Ollama model\nollama create mymodel -f Modelfile\nollama run mymodel\n\n# Add to Gradio interface\n# Edit gradio_chat_app.py, update MODEL_NAME\n```\n\n### API Integration\n```python\n# Access Ollama API programmatically\nimport requests\n\nresponse = requests.post('http://10.11.1.105:11434/api/generate', \n    json={\n        'model': 'llama3.2:3b',\n        'prompt': 'Hello, world!',\n        'stream': False\n    })\n```\n\n## 📝 Version History\n\n### v1.0.0 (2025-10-02)\n- ✅ Initial release with working admin panel\n- ✅ Fixed service status detection (IPv4/IPv6 compatibility)\n- ✅ JupyterLab external access configuration\n- ✅ All services online and accessible\n- ✅ Real-time monitoring with 30s auto-refresh\n- ✅ Complete documentation and setup guide\n\n---\n\n**🎯 Status**: Production Ready ✅  \n**👨‍💻 Author**: DevOps Team  \n**📅 Last Updated**: October 2, 2025  \n**🏠 Environment**: RTX 4090 Workstation (10.11.1.105)  \n**🔗 Admin Panel**: http://10.11.1.105:5000 (admin / Dragon@123!@#)  \n**📦 Repository**: https://github.com/webdevtodayjason/home-lab","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebdevtodayjason%2Fhome-lab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebdevtodayjason%2Fhome-lab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebdevtodayjason%2Fhome-lab/lists"}