ARTICLE DETAIL

建站实战干货

来自一线的建站与推广经验沉淀,每一条都经过真实交付验证。

Remote Server

2026/9/21 19:02:55 拓冰建站 浏览量
Remote Server Remote Server【免费下载链接】Auto-claude-code-research-in-sleepARIS ⚔️ (Auto-Research-In-Sleep) — Lightweight Markdown-only skills for autonomous ML research: cross-model review loops, idea discovery, and experiment automation. No framework, no lock-in — works with Claude Code, Codex, OpenClaw, or any LLM agent.项目地址: https://gitcode.com/gh_mirrors/au/Auto-claude-code-research-in-sleepgpu: remoteSSH:ssh my-gpu-server(key-based auth, no password)GPU: 4x A100Conda env:research(Python 3.10 PyTorch)Activate:eval $(/opt/conda/bin/conda shell.bash hook) conda activate researchCode directory:/home/user/experiments/Usescreenfor background jobs:screen -dmS exp0 bash -c ...关键字段说明 - **SSH**必须是基于密钥的免密登录ARIS 会在无人工干预下反复发起 SSH 会话密码登录会阻塞自动流程。先在本地验证ssh my-gpu-server echo ok。 - **Activate**环境激活命令必须是单行可执行的形式。ARIS 部署时会把它拼进 screen 后台会话因此必须形如 eval $(conda shell.bash hook) conda activate research不要依赖交互式 shell 的登录脚本。 - **Code directory**实验代码的远端落地目录run-experiment 的代码同步步骤以此为目的地。 - **Use screen**ARIS README 默认使用 screen 托管后台任务若你偏好 tmux也可写 tmux new -d -s exp0 bash -c ...见 [SETUP_GUIDE.md](https://link.gitcode.com/i/79bc8319cbe904554670cb38636919b9) 4.2 节。两种方式 run-experiment 均可配合验证。 ### 部署链路源码视角 [run-experiment](https://link.gitcode.com/i/0aac7b3a598f82fc5472f8f8853b7a64) 检测到 gpu: remote 后按以下步骤执行 1. **环境检测**读取 CLAUDE.md 获取 SSH 别名、conda env、代码目录。 2. **Pre-flight 检查**先查 GPU 是否空闲空闲判定为 memory.used 500 MiB bash ssh server nvidia-smi --query-gpuindex,memory.used,memory.total --formatcsv,noheader同步代码默认用rsync只同步必要源码排除数据、checkpoint 和大文件rsync -avz --include*.py --exclude* local_src/ server:remote_dst/若CLAUDE.md设置了code_sync: git则改为本地git push 远端git pull。部署为每个实验创建独立的 screen 会话并绑定 GPUssh server screen -dmS exp_name bash -c \ eval \\$(conda_path/conda shell.bash hook)\ \ conda activate env \ CUDA_VISIBLE_DEVICESgpu_id python script args 21 | tee log_file验证启动ssh server screen -ls确认会话存在。Option B本地 GPUgpu: local如果本机就是 GPU 服务器无需 SSH在CLAUDE.md中添加## GPU Environment - gpu: local - This machine has direct GPU access (no SSH needed) - GPU: 4x A100 80GB - Experiment environment: YOUR_CONDA_ENV (Python 3.x PyTorch) - Activate before any Python command: The command to activate your experiment environment (uv, conda, etc.) - Code directory: /home/YOUR_USERNAME/YOUR_CODE_DIRECTORY/源码中对应的执行路径run-experiment不再走 SSH 与 rsyncpre-flight 直接用本机nvidia-smi查询Mac 环境则检查torch.backends.mps.is_available()部署命令直接在前台执行# Linux with CUDA CUDA_VISIBLE_DEVICESgpu_id python script args 21 | tee log_file长任务可通过run_in_background: true保持会话响应。注意本地模式同样遵循 ALWAYS check GPU availability first 的铁律——绝不盲目分配 GPU。Option CVast.ai 按需租用 GPUgpu: vast没有 GPUARIS 支持从 Vast.ai 按需租用。其核心工作方式是分析训练任务模型大小、数据集、预估时长→ 在市场上搜索最便宜的合适 GPU → 按总成本而非单纯 $/hr排序 → 自动完成 租用 → 运行 → 收集结果 → 销毁。最小配置在CLAUDE.md中写入## Vast.ai - gpu: vast # rent on-demand GPU from vast.ai - auto_destroy: true # auto-destroy after experiment completes (default) - max_budget: 5.00 # optional: warn if estimated cost exceeds thisauto_destroy: true实验结束后自动销毁实例默认值。设为false则保留实例以便 SSH 登录检查。max_budget: 5.00可选。当 ARIS 的成本估算超过该值时警告并确认不会硬性阻止租用。可选进阶字段见 vast-gpuimage: pytorch/pytorch:2.1.0-cuda12.1-cudnn8-devel可覆盖默认 Docker 镜像。前置条件5 步完整流程见 docs/integrations/VAST_GPU_GUIDE.md创建 Vast.ai 账户并绑定支付方式信用卡或加密货币。安装vastaiCLI要求 Python ≥ 3.10旧版本 Python 请用conda create/pyenv/uv venv建虚拟环境pip install vastai设置 API Key从 https://cloud.vast.ai/cli/ 获取vastai set api-key YOUR_API_KEY上传 SSH 公钥到 https://cloud.vast.ai/manage-keys/——这一步必须在租用任何实例之前完成因为密钥在实例创建时就被固化没有公钥时先生成ssh-keygen -t ed25519 -C your_emailexample.com cat ~/.ssh/id_ed25519.pub # copy this to Vast.ai验证环境测试搜索可用vastai search offers gpu_ram24 reliability0.95 -o dph --limit 3成本排序与选择ARIS 分析任务VRAM、训练时长、GPU 数量、磁盘、CUDA 版本后呈现按预估总成本排序的选项表| # | GPU | VRAM | $/hr | Est. Hours | Est. Total | Offer ID | |---|-----------|-------|-------|------------|------------|----------| | 1 | RTX 4090 | 24 GB | $0.28 | ~4h | ~$1.12 | 6995713 | ← best value | 2 | A100 SXM | 80 GB | $0.95 | ~2h | ~$1.90 | 7023456 | ← fastest选序号后 ARIS 自动完成后续全部工作。任务需求估算的规则vast-gpu模型参数 ×4 字节fp32或 ×2fp16/bf16加优化器状态与激活值估算最小 VRAM经验值如 7B 模型 ≈ 16 GBfp16、13B ≈ 28 GB预估时长加 30% 缓冲默认磁盘 50 GB、CUDA 12.1。展示时必须给出总成本$/hr × 预估小时数因为 $0.90/hr 跑 2h$1.80比 $0.30/hr 跑 8h$2.40更便宜。实例状态文件所有活跃的 Vast.ai 实例记录在项目根目录vast-instances.json它是run-experiment与monitor-experiment连接实例的唯一事实来源[ { instance_id: 33799165, offer_id: 25831376, gpu_name: RTX_3060, num_gpus: 1, dph: 0.0414, ssh_url: ssh://root1.208.108.242:58955, ssh_host: 1.208.108.242, ssh_port: 58955, created_at: 2026-03-29T21:12:00Z, status: running, experiment: exp01_baseline, estimated_hours: 4.0, estimated_cost: 0.17 } ]手动控制命令在/run-experiment流程之外可用专用技能/vast-gpu手动管理/vast-gpu # interactive — search, pick, rent /vast-gpu list # list your current rented instances /vast-gpu destroy instance-id # tear down manually【免费下载链接】Auto-claude-code-research-in-sleepARIS ⚔️ (Auto-Research-In-Sleep) — Lightweight Markdown-only skills for autonomous ML research: cross-model review loops, idea discovery, and experiment automation. No framework, no lock-in — works with Claude Code, Codex, OpenClaw, or any LLM agent.项目地址: https://gitcode.com/gh_mirrors/au/Auto-claude-code-research-in-sleep创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考