Skip to content

1. Linux 平台

请根据以下步骤逐步操作。

▫️环境安装

shell
sudo apt-get install git gcc make python3 python3-pip ffmpeg

▫️克隆仓库

shell
git clone https://gitee.com/Ai-Thinker-Open/aipi-palchat_v2.git
(点击查看) 克隆完成实例

alt text

▫️运行环境安装脚本

  • 进入SDK
shell
cd aipi-palchat_v2
  • 运行脚本
shell
./projet_script.sh

运行这个指令之后,需要等待克隆完成!

(点击查看) 成功实例

alt text

▫️编译测试

  • 进入到工程目录:/doubao
shell
cd doubao
  • 编译
shell
make
(点击查看) 编译完成示例

alt text

2. Windows 平台

使用 以管理员身份运行 PowerShell。在 PowerShell 下方指令安装Linux 子系统:

shell
wsl --install
(点击查看) 安装完成示例

alt text

▫️重启电脑(记得保存资料)

▫️安装Ubtuntu20.04

按住 shift+鼠标右键 重新打开 PowerShell,运行指令安装 Ubutun20.04.

shell
 wsl --install -d Ubuntu-20.04
(点击查看) 安装示例

alt text

  • 根据提示新建用户名和密码即可

▫️VSCode 安装WSL 集成

在VSCode 集成中搜索 WSL,并且安装:

alt text

▫️VSCode 打开WSL

在VSCode 的搜索栏输入:>WSL 选择 WSL:连接到WSL

alt text

在首次连接WSL时,会下载 VSCode 服务器,要保持电脑网路正常。

(点击查看) 连接成功示例

alt text

▫️更换软件源

  • 用终端使用下方指令:
shell
sudo vi /etc/apt/sources.list
  • 把内容全部替换为下方的源地址:
清华源 (Ubuntu20.04)
shell
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse

# 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换
deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
# deb-src http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
阿里源 (Ubuntu20.04)
shell
deb https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse

# deb https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
中科大源 (Ubuntu20.04)
shell
# 默认注释了源码仓库,如有需要可自行取消注释
deb https://mirrors.ustc.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-security main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-updates main restricted universe multiverse

deb https://mirrors.ustc.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-backports main restricted universe multiverse

示例:

alt text

▫️更新源

shell
sudo apt update

▫️升级源

shell
sudo apt upgrade

▫️安装开发依赖

shell
sudo apt-get install git gcc make python3 python3-pip

▫️克隆仓库

参考 克隆仓库 章节

Released under the MIT License.