docs: restructure website, optimize HTML, gitignore private files
Website docs (website/docs/): - Delete 6 stale -md.html duplicates - Rename docs-clients/miners/developers → clients/miners/developers.html - Unify header/nav across all 15 pages (new .site-header pattern) - Fix 34 dead href=# links with real targets - Upgrade Font Awesome v4→v6 in index.html - Replace search stub with live client-side search (15-page index) - Extract all inline CSS into shared docs.css (+630 lines) - Extract inline theme JS into shared theme.js - Strip inline style= attributes from 10+ pages - Add .announce-banner, .source-links, .search-results CSS classes - Add Markdown Source links to clients/miners/developers pages - Update components.html title to Architecture & Components - Move browser-wallet.html to website/wallet/, leave redirect - Update all dates to February 2026 Website root: - Delete 6 root-level duplicate HTML files (160KB saved) - Rewire index.html and 404.html links Root README.md: - Fix 8 broken doc links to new numbered folder structure - Update copyright to 2026 .gitignore + .example files: - Gitignore private files: .aitbc.yaml, .env, deploy scripts, GPU scripts, service scripts, infra configs, .windsurf/, website README - Create 7 .example files for GitHub users with sanitized templates - Untrack 47 previously committed private files Live server: - Push all website files to aitbc-cascade:/var/www/html/ - Clean stale admin.html and index.nginx-debian.html
This commit is contained in:
@@ -1,130 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Deploy GPU Miner Integration to AITBC Container
|
||||
"""
|
||||
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
def run_in_container(cmd):
|
||||
"""Run command in aitbc container"""
|
||||
full_cmd = f"incus exec aitbc -- {cmd}"
|
||||
print(f"Running: {full_cmd}")
|
||||
result = subprocess.run(full_cmd, shell=True, capture_output=True, text=True)
|
||||
if result.returncode != 0:
|
||||
print(f"Error: {result.stderr}")
|
||||
return False, result.stderr
|
||||
return True, result.stdout
|
||||
|
||||
def deploy_gpu_miner_to_container():
|
||||
print("🚀 Deploying GPU Miner Integration to AITBC Container...")
|
||||
|
||||
# Check container access
|
||||
print("\n1. 🔍 Checking container access...")
|
||||
success, output = run_in_container("whoami")
|
||||
if success:
|
||||
print(f" Container user: {output.strip()}")
|
||||
else:
|
||||
print(" ❌ Cannot access container")
|
||||
return
|
||||
|
||||
# Copy GPU miner files to container
|
||||
print("\n2. 📁 Copying GPU miner files...")
|
||||
files_to_copy = [
|
||||
"gpu_miner_with_wait.py",
|
||||
"gpu_registry_demo.py"
|
||||
]
|
||||
|
||||
for file in files_to_copy:
|
||||
cmd = f"incus file push /home/oib/windsurf/aitbc/{file} aitbc/home/oib/"
|
||||
print(f" Copying {file}...")
|
||||
result = subprocess.run(cmd, shell=True)
|
||||
if result.returncode == 0:
|
||||
print(f" ✅ {file} copied")
|
||||
else:
|
||||
print(f" ❌ Failed to copy {file}")
|
||||
|
||||
# Install dependencies in container
|
||||
print("\n3. 📦 Installing dependencies...")
|
||||
run_in_container("pip install httpx fastapi uvicorn psutil")
|
||||
|
||||
# Create GPU miner service in container
|
||||
print("\n4. ⚙️ Creating GPU miner service...")
|
||||
service_content = """[Unit]
|
||||
Description=AITBC GPU Miner Client
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=oib
|
||||
WorkingDirectory=/home/oib
|
||||
ExecStart=/usr/bin/python3 gpu_miner_with_wait.py
|
||||
Restart=always
|
||||
RestartSec=30
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
"""
|
||||
|
||||
# Write service file to container
|
||||
with open('/tmp/gpu-miner.service', 'w') as f:
|
||||
f.write(service_content)
|
||||
subprocess.run("incus file push /tmp/gpu-miner.service aitbc/tmp/", shell=True)
|
||||
run_in_container("sudo mv /tmp/gpu-miner.service /etc/systemd/system/")
|
||||
run_in_container("sudo systemctl daemon-reload")
|
||||
run_in_container("sudo systemctl enable gpu-miner.service")
|
||||
run_in_container("sudo systemctl start gpu-miner.service")
|
||||
|
||||
# Create GPU registry service in container
|
||||
print("\n5. 🎮 Creating GPU registry service...")
|
||||
registry_service = """[Unit]
|
||||
Description=AITBC GPU Registry
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=oib
|
||||
WorkingDirectory=/home/oib
|
||||
ExecStart=/usr/bin/python3 gpu_registry_demo.py
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
"""
|
||||
|
||||
with open('/tmp/gpu-registry.service', 'w') as f:
|
||||
f.write(registry_service)
|
||||
subprocess.run("incus file push /tmp/gpu-registry.service aitbc/tmp/", shell=True)
|
||||
run_in_container("sudo mv /tmp/gpu-registry.service /etc/systemd/system/")
|
||||
run_in_container("sudo systemctl daemon-reload")
|
||||
run_in_container("sudo systemctl enable gpu-registry.service")
|
||||
run_in_container("sudo systemctl start gpu-registry.service")
|
||||
|
||||
# Check services
|
||||
print("\n6. 📊 Checking services...")
|
||||
success, output = run_in_container("sudo systemctl status gpu-miner.service --no-pager")
|
||||
print(output)
|
||||
|
||||
success, output = run_in_container("sudo systemctl status gpu-registry.service --no-pager")
|
||||
print(output)
|
||||
|
||||
# Update coordinator to include miner endpoints
|
||||
print("\n7. 🔗 Updating coordinator API...")
|
||||
|
||||
print("\n✅ GPU Miner deployed to container!")
|
||||
print("\n📊 Access URLs:")
|
||||
print(" - Container IP: 10.1.223.93")
|
||||
print(" - GPU Registry: http://10.1.223.93:8091/miners/list")
|
||||
print(" - Coordinator API: http://10.1.223.93:8000")
|
||||
|
||||
print("\n🔧 To manage services in container:")
|
||||
print(" incus exec aitbc -- sudo systemctl status gpu-miner")
|
||||
print(" incus exec aitbc -- sudo journalctl -u gpu-miner -f")
|
||||
|
||||
if __name__ == "__main__":
|
||||
deploy_gpu_miner_to_container()
|
||||
Reference in New Issue
Block a user