Skip to content

Instantly share code, notes, and snippets.

@yuekaizhang
yuekaizhang / install-claude.sh
Last active September 4, 2026 07:32
Install Claude Code native binary into a custom directory (not $HOME)
#!/bin/bash
# Install Claude Code's native binary into a custom directory instead of $HOME.
#
# Why: the official installer (curl -fsSL https://claude.ai/install.sh | bash)
# and the `claude install` subcommand it execs both hardcode:
# ~/.local/bin/claude (launcher)
# ~/.local/share/claude/versions/ (actual binaries, for auto-update)
# ~/.claude/ (config/state, unless CLAUDE_CONFIG_DIR is set)
# There is no supported flag to relocate these (checked against the official
# docs). The trick: override $HOME just for the install step so everything

UI-TARS 本地部署

环境

# 先配置 ngc key, passwd is your ngc key
docker login nvcr.io
docker pull nvcr.io/nvidia/tritonserver:25.02-vllm-python-py3
docker run -it --gpus all --name "ui-tars" --net host nvcr.io/nvidia/tritonserver:25.02-vllm-python-py3
#!/usr/bin/env python3
# Generation Command: polygraphy run --gen test.py my_define_network.py --trt --fp16 --load-inputs inputs.json --load-outputs layerwise_golden.json --check-error-stat median --atol 0.1 --rtol 0.1
# It will check against outputs stored in layerwise_golden.json
from polygraphy.logger import G_LOGGER
from polygraphy import func
from polygraphy.backend.trt import NetworkFromOnnxPath
import tensorrt as trt
from polygraphy import util