|
1295 | 1295 | ] |
1296 | 1296 | }, |
1297 | 1297 | { |
1298 | | - "name": "stdin", |
| 1298 | + "name": "stdout", |
1299 | 1299 | "output_type": "stream", |
1300 | 1300 | "text": [ |
1301 | 1301 | "\n", |
|
1820 | 1820 | "🔧 System Requirements:\n", |
1821 | 1821 | " ✅ Docker: Installed\n", |
1822 | 1822 | " ✅ NVIDIA Docker: Available\n", |
1823 | | - " ✅ Disk Space: /ephemeral: 6121.2 GB free, /home/shadeform/Multi-Agent-Intelligent-Warehouse: 71.2 GB free (best 6121.2 GB — need 100GB+ on one filesystem)\n", |
| 1823 | + " ✅ Disk Space: /ephemeral: 6121.2 GB free, /home/shadeform/Multi-Agent-Intelligent-Warehouse: 41.2 GB free (best 6121.2 GB — need 100GB+ on one filesystem)\n", |
1824 | 1824 | " ✅ CUDA: 12.x (detected from driver)\n", |
1825 | 1825 | "\n", |
1826 | 1826 | "======================================================================\n", |
|
1873 | 1873 | " 'nvidia_docker_available': True,\n", |
1874 | 1874 | " 'disk_space_gb': 6121.189472198486,\n", |
1875 | 1875 | " 'disk_space_breakdown': [('/ephemeral', 6121.189472198486),\n", |
1876 | | - " ('/home/shadeform/Multi-Agent-Intelligent-Warehouse', 71.18986511230469)],\n", |
| 1876 | + " ('/home/shadeform/Multi-Agent-Intelligent-Warehouse', 41.22386932373047)],\n", |
1877 | 1877 | " 'cuda_version': '12.x (detected from driver)',\n", |
1878 | 1878 | " 'can_run_local': True,\n", |
1879 | 1879 | " 'recommendation': 'local_ideal',\n", |
|
2144 | 2144 | "🔧 System Requirements:\n", |
2145 | 2145 | " ✅ Docker: Installed\n", |
2146 | 2146 | " ✅ NVIDIA Docker: Available\n", |
2147 | | - " ✅ Disk Space: /ephemeral: 6121.2 GB free, /home/shadeform/Multi-Agent-Intelligent-Warehouse: 71.2 GB free (best 6121.2 GB — need 100GB+ on one filesystem)\n", |
| 2147 | + " ✅ Disk Space: /ephemeral: 6121.2 GB free, /home/shadeform/Multi-Agent-Intelligent-Warehouse: 41.2 GB free (best 6121.2 GB — need 100GB+ on one filesystem)\n", |
2148 | 2148 | " ✅ CUDA: 12.x (detected from driver)\n", |
2149 | 2149 | "\n", |
2150 | 2150 | "======================================================================\n", |
|
2157 | 2157 | ] |
2158 | 2158 | }, |
2159 | 2159 | { |
2160 | | - "name": "stdin", |
| 2160 | + "name": "stdout", |
2161 | 2161 | "output_type": "stream", |
2162 | 2162 | "text": [ |
2163 | 2163 | "\n", |
|
2209 | 2209 | ] |
2210 | 2210 | }, |
2211 | 2211 | { |
2212 | | - "name": "stdin", |
| 2212 | + "name": "stdout", |
2213 | 2213 | "output_type": "stream", |
2214 | 2214 | "text": [ |
2215 | 2215 | "\n", |
|
2362 | 2362 | }, |
2363 | 2363 | { |
2364 | 2364 | "cell_type": "code", |
2365 | | - "execution_count": null, |
| 2365 | + "execution_count": 6, |
2366 | 2366 | "metadata": {}, |
2367 | 2367 | "outputs": [ |
2368 | 2368 | { |
|
2379 | 2379 | ] |
2380 | 2380 | }, |
2381 | 2381 | { |
2382 | | - "name": "stdin", |
| 2382 | + "name": "stdout", |
2383 | 2383 | "output_type": "stream", |
2384 | 2384 | "text": [ |
2385 | 2385 | " Overwrite? (y/N): y\n" |
|
2399 | 2399 | ] |
2400 | 2400 | }, |
2401 | 2401 | { |
2402 | | - "name": "stdin", |
| 2402 | + "name": "stdout", |
2403 | 2403 | "output_type": "stream", |
2404 | 2404 | "text": [ |
2405 | 2405 | " Run `docker pull` now? (Y/n): Y\n" |
|
2415 | 2415 | "✅ LLM NIM container started\n", |
2416 | 2416 | "\n", |
2417 | 2417 | "🧪 Verifying local NIM installation...\n", |
2418 | | - " Waiting... (1/12)\n", |
2419 | | - " Waiting... (2/12)\n", |
2420 | | - " Waiting... (3/12)\n", |
2421 | | - " Waiting... (4/12)\n" |
| 2418 | + " Waiting for NIM ready... (1/45)\n", |
| 2419 | + "✅ Local NIM is up (checked http://localhost:8000/v1/health/live)\n", |
| 2420 | + "\n", |
| 2421 | + "✅ Configuration updated for LOCAL installation\n", |
| 2422 | + " LLM_NIM_URL=http://localhost:8000/v1\n", |
| 2423 | + " LLM_MODEL=nvidia/llama-3.3-nemotron-super-49b-v1.5\n", |
| 2424 | + "\n", |
| 2425 | + "✅ Local LLM installation complete!\n" |
2422 | 2426 | ] |
2423 | 2427 | } |
2424 | 2428 | ], |
|
2468 | 2472 | " - nim_models:/models\n", |
2469 | 2473 | " restart: unless-stopped\n", |
2470 | 2474 | " healthcheck:\n", |
2471 | | - " test: [\"CMD\", \"curl\", \"-f\", \"http://localhost:8000/health\"]\n", |
| 2475 | + " test: [\"CMD\", \"curl\", \"-f\", \"http://localhost:8000/v1/health/ready\"]\n", |
2472 | 2476 | " interval: 30s\n", |
2473 | 2477 | " timeout: 10s\n", |
2474 | 2478 | " retries: 3\n", |
|
2622 | 2626 | "def verify_local_nim_installation():\n", |
2623 | 2627 | " \"\"\"\n", |
2624 | 2628 | " Verify local NIM is running and accessible.\n", |
| 2629 | + "\n", |
| 2630 | + " NVIDIA NIM LLM readiness is documented at /v1/health/ready (not legacy /health).\n", |
| 2631 | + " Large models can take several minutes on first start — wait longer than a quick dev server.\n", |
2625 | 2632 | " \"\"\"\n", |
2626 | 2633 | " print(\"\\n🧪 Verifying local NIM installation...\")\n", |
2627 | | - " \n", |
2628 | | - " max_retries = 12 # 2 minutes total\n", |
| 2634 | + " import os\n", |
| 2635 | + "\n", |
| 2636 | + " _nim_port = os.getenv(\"LLM_NIM_PORT\", \"8000\")\n", |
| 2637 | + " _base = f\"http://localhost:{_nim_port}\"\n", |
| 2638 | + " # Prefer readiness probes (NIM docs); avoid /v1/models alone (can 200 before weights are ready).\n", |
| 2639 | + " _candidates = (\n", |
| 2640 | + " f\"{_base}/v1/health/ready\",\n", |
| 2641 | + " f\"{_base}/v1/health/live\",\n", |
| 2642 | + " f\"{_base}/health\",\n", |
| 2643 | + " )\n", |
| 2644 | + "\n", |
| 2645 | + " max_retries = 45 # ~7.5 min at 10s interval (49B cold start / weight download)\n", |
2629 | 2646 | " for i in range(max_retries):\n", |
2630 | | - " try:\n", |
2631 | | - " response = requests.get(\n", |
2632 | | - " \"http://localhost:8000/health\",\n", |
2633 | | - " timeout=5\n", |
2634 | | - " )\n", |
2635 | | - " if response.status_code == 200:\n", |
2636 | | - " print(\"✅ Local NIM is running and healthy!\")\n", |
2637 | | - " return True\n", |
2638 | | - " except:\n", |
2639 | | - " pass\n", |
2640 | | - " \n", |
| 2647 | + " for url in _candidates:\n", |
| 2648 | + " try:\n", |
| 2649 | + " response = requests.get(url, timeout=10)\n", |
| 2650 | + " if response.status_code == 200:\n", |
| 2651 | + " print(f\"✅ Local NIM is up (checked {url})\")\n", |
| 2652 | + " return True\n", |
| 2653 | + " except Exception:\n", |
| 2654 | + " pass\n", |
2641 | 2655 | " if i < max_retries - 1:\n", |
2642 | | - " print(f\" Waiting... ({i+1}/{max_retries})\")\n", |
| 2656 | + " print(f\" Waiting for NIM ready... ({i + 1}/{max_retries})\")\n", |
2643 | 2657 | " time.sleep(10)\n", |
2644 | | - " \n", |
2645 | | - " print(\"❌ Local NIM verification failed\")\n", |
| 2658 | + "\n", |
| 2659 | + " print(\"❌ Local NIM verification failed (no 200 from readiness URLs)\")\n", |
| 2660 | + " print(\" Tried:\", \", \".join(_candidates))\n", |
2646 | 2661 | " print(\" Check logs: docker logs wosa-llm-nim\")\n", |
2647 | 2662 | " return False\n", |
2648 | 2663 | "\n", |
|
2765 | 2780 | }, |
2766 | 2781 | { |
2767 | 2782 | "cell_type": "code", |
2768 | | - "execution_count": null, |
| 2783 | + "execution_count": 7, |
2769 | 2784 | "metadata": {}, |
2770 | | - "outputs": [], |
| 2785 | + "outputs": [ |
| 2786 | + { |
| 2787 | + "name": "stdout", |
| 2788 | + "output_type": "stream", |
| 2789 | + "text": [ |
| 2790 | + "📋 Environment Variables Configuration\n", |
| 2791 | + "============================================================\n", |
| 2792 | + "\n", |
| 2793 | + "🔍 Current Configuration:\n", |
| 2794 | + "\n", |
| 2795 | + " NVIDIA_API_KEY = nvapi-9_... # NVIDIA API Key (for NIM services)\n", |
| 2796 | + " LLM_NIM_URL = http://localhost:8000/v1 # LLM NIM Endpoint\n", |
| 2797 | + " EMBEDDING_NIM_URL = https://integrate.api.nvidia.com/v1 # Embedding NIM Endpoint\n", |
| 2798 | + " POSTGRES_PASSWORD = ⚠️ NOT SET (using default/placeholder) # Database Password\n", |
| 2799 | + " JWT_SECRET_KEY = your-str... # JWT Secret Key (for authentication)\n", |
| 2800 | + " DEFAULT_ADMIN_PASSWORD = ⚠️ NOT SET (using default/placeholder) # Default Admin Password\n", |
| 2801 | + " DB_HOST = localhost # Database Host\n", |
| 2802 | + " DB_PORT = 5435 # Database Port\n", |
| 2803 | + "\n", |
| 2804 | + "============================================================\n", |
| 2805 | + "\n", |
| 2806 | + "✅ Environment file check complete!\n", |
| 2807 | + "\n", |
| 2808 | + "💡 Important Notes:\n", |
| 2809 | + " - For production, change all default passwords and secrets\n", |
| 2810 | + " - NVIDIA_API_KEY is required for AI features\n", |
| 2811 | + " - JWT_SECRET_KEY is required in production\n", |
| 2812 | + "\n", |
| 2813 | + "📝 To edit: nano .env (or your preferred editor)\n" |
| 2814 | + ] |
| 2815 | + }, |
| 2816 | + { |
| 2817 | + "data": { |
| 2818 | + "text/plain": [ |
| 2819 | + "True" |
| 2820 | + ] |
| 2821 | + }, |
| 2822 | + "execution_count": 7, |
| 2823 | + "metadata": {}, |
| 2824 | + "output_type": "execute_result" |
| 2825 | + } |
| 2826 | + ], |
2771 | 2827 | "source": [ |
2772 | 2828 | "from pathlib import Path\n", |
2773 | 2829 | "import os\n", |
|
2894 | 2950 | "metadata": {}, |
2895 | 2951 | "outputs": [], |
2896 | 2952 | "source": [ |
2897 | | - " # Check if already stored\n", |
2898 | | - " # Try to find project root\n", |
2899 | | - " # Check if we're already in project root\n", |
2900 | | - " # Check if we're in notebooks/setup/ (go up 2 levels)\n", |
2901 | | - " # Check if we're in notebooks/ (go up 1 level)\n", |
2902 | | - " # Try going up from current directory\n", |
2903 | | - " # Change to project root and store it\n", |
2904 | 2953 | "import subprocess\n", |
2905 | 2954 | "import time\n", |
2906 | 2955 | "from pathlib import Path\n", |
|
3147 | 3196 | "metadata": {}, |
3148 | 3197 | "outputs": [], |
3149 | 3198 | "source": [ |
3150 | | - " # Check if already stored\n", |
3151 | | - " # Try to find it\n", |
3152 | | - " # Check if we're already in project root\n", |
3153 | | - " # Check if we're in notebooks/setup/ (go up 2 levels)\n", |
3154 | | - " # Check if we're in notebooks/ (go up 1 level)\n", |
3155 | | - " # Try going up from current directory\n", |
3156 | | - " # Change to project root and store it\n", |
3157 | 3199 | "import subprocess\n", |
3158 | 3200 | "import os\n", |
3159 | 3201 | "from pathlib import Path\n", |
|
3333 | 3375 | "metadata": {}, |
3334 | 3376 | "outputs": [], |
3335 | 3377 | "source": [ |
3336 | | - " # Check if already stored\n", |
3337 | | - " # Try to find project root\n", |
3338 | | - " # Check if we're already in project root\n", |
3339 | | - " # Check if we're in notebooks/setup/ (go up 2 levels)\n", |
3340 | | - " # Check if we're in notebooks/ (go up 1 level)\n", |
3341 | | - " # Try going up from current directory\n", |
3342 | | - " # Change to project root and store it\n", |
3343 | 3378 | "import subprocess\n", |
3344 | 3379 | "import sys\n", |
3345 | 3380 | "from pathlib import Path\n", |
|
0 commit comments