xiaowei-system/scripts/gpu_run.sh

14 lines
368 B
Bash
Executable File

#!/bin/bash
# GPU 推理启动脚本 — 设置 CUDA 环境后运行 Python
# 用法: gpu_run.sh <python脚本> [参数...]
# 或者: gpu_run.sh "python代码"
export LD_LIBRARY_PATH=/home/muc/.local/lib:/usr/local/cuda/lib64:$LD_LIBRARY_PATH
export CUDA_VISIBLE_DEVICES=0
# 激活 venv
source ~/.hermes/hermes-agent/.venv/bin/activate
# 运行 Python
python3 "$@"