医疗智能体 EIHEALTH-步骤3:初始化配置:命令示例

时间:2024-05-15 09:43:56

命令示例

  • 初始化配置
    health config add -d xxx -u xxx -w xxx  -i xxx -r cn-north-4 -o obs.cn-north-4.myhuaweicloud.com  -a xxx -s xxx -D https://xxx -q xxx –f -m xxx -e xxx -t xxx
    # 执行成功返回结果如下
    add ak successfully! 
    add sk successfully! 
    add region successfully!
    add platform-id successfully!
    add user-name successfully! 
    add password successfully!
    add domain-name successfully! 
    add obs-endpoint successfully!          
    add obs_install_path successfully!      
    add obs_down_load_url successfully!
    add iam-endpoint successfully!
    add health-endpoint successfully!
    add swr-endpoint successfully!
  • 初始化配置
    health config add -d xxx -u xxx -w xxx  -i xxx -r cn-north-4  -a xxx -s xxx -D https://xxx -q xxx
    # 执行成功返回结果如下
    add ak successfully! 
    add sk successfully! 
    add region successfully!
    add platform-id successfully!
    add user-name successfully! 
    add password successfully!
    add domain-name successfully! 
    add obs_install_path successfully!      
    add obs_down_load_url successfully!
    图1 命令示例
  • 初始化配置并设置日志存储路径
    health config add -d xxx -u xxx -w xxx  -i xxx -r cn-north-4 -o obs.cn-north-4.myhuaweicloud.com  -a xxx -s xxx -D https://xxx -q xxx --log-path D:\log\eihealth.log –f -m xxx -e xxx -t xxx
    # 执行成功返回结果如下
    add ak successfully! 
    add sk successfully! 
    add region successfully!
    add platform-id successfully!
    add user-name successfully! 
    add password successfully!
    add domain-name successfully! 
    add obs-endpoint successfully!          
    add obs_install_path successfully!      
    add obs_down_load_url successfully!
    add log-path successfully!
    add iam-endpoint successfully!
    add health-endpoint successfully!
    add swr-endpoint successfully!
  • 初始化配置并设置日志存储路径
    health config add -d xxx -u xxx -w xxx  -i xxx -r cn-north-4  -a xxx -s xxx -D https://xxx -q xxx --log-path D:\log\eihealth.log 
    # 执行成功返回结果如下
    add ak successfully! 
    add sk successfully! 
    add region successfully!
    add platform-id successfully!
    add user-name successfully! 
    add password successfully!
    add domain-name successfully!        
    add obs_install_path successfully!      
    add obs_down_load_url successfully!
    add log-path successfully!
  • 清空配置请执行health config clear命令
  • 在Notebook中使用命令行工具

    EIHealth 开发环境Notebook中使用命令行工具时,请依据以下步骤配置代理。

    1. 打开Notebook,并选择Terminal,打开Notebook的命令行界面。
    2. 执行以下命令下载命令行工具,并获取配置Notebook代理所需的 域名 和端口信息。
      示例中下载的版本为Linux ARM 64位。
      wget https://eihealth-cli.obs.cn-north-4.myhuaweicloud.com/current/health-linux-aarch64.tar

    3. 初始化配置时,添加--http-proxy命令,用于配置代理。
      health config add --http-proxy http://域名:端口号
  • 执行以上命令,会在系统所在的用户目录下自动生成“.health”文件夹,文件夹中包含config.ini配置文件,用于存储任务执行所涉及到的配置,如密钥、区域、当前项目等信息。
  • 生成的配置文件不建议直接修改,如需改动请使用命令行工具修改。
  • 配置文件中保存有用户的AK、SK信息,为了避免密钥泄露,会对文件中的SK进行加密以保护密钥安全。
  • 初始化配置时,如果命令同时填写了AK/SK和密码,默认AK/SK方式登录。
  • 初始化配置命令会在history中暴露ak、sk,建议使用set +o history命令关闭history再执行。执行后可使用set -o history命令恢复。
support.huaweicloud.com/clilist-eihealth/eihealth_31_0005.html