mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-29 05:09:46 +01:00
* 添加 长期记忆功能 * fix bugs * add memory parm for config.yaml * fix is_segment for tts * 推送主分支测试 * 🎈 perf: 美化log * 🐞 fix: bug 改用opus_next,增加文档 * 合并main到develop (#75) * fix: 多种docker build 编译方式 * fix:push * 优化打包速度 (#65) * 🐳 chore: 优化打包速度 使用国内镜像 * 🎈 perf: 优化打包速度 注释日志的时间信息 * 合并多个更新 (#68) * 🐳 chore: 优化打包速度 使用国内镜像 * 🎈 perf: 优化打包速度 注释日志的时间信息 * 🐳 chore: 改用docker hub * 🐎 ci(ci): 自动打包docker * 🐳 chore: 更新文档 * 🎈 perf: 改用opuslib_next * 🌈 style: 统一log * minimax语音tts和阿里云智能语音tts适配 * 本地模型不重复创建,共用一个 (#51) * 本地模型不重复创建,共用一个 * 更新web端页面发布版本 * 🎈 perf: 优化开发体验 (#70) 添加内置模型下载,yarn --------- Co-authored-by: TOM88812 <ttangxs0808@163.com> Co-authored-by: HonestQiao <honestqiao@163.com> Co-authored-by: 玄凤科技 <128943504+Eric0308@users.noreply.github.com> Co-authored-by: 欣南科技 <huangrongzhuang@xin-nan.com> Co-authored-by: Huang <32005838+openrz@users.noreply.github.com> * feat: support doubao online ASR * feat: support doubao online ASR --------- Co-authored-by: fofo <zhongpei@vip.qq.com> Co-authored-by: hrz <1710360675@qq.com> Co-authored-by: 玄凤科技 <128943504+Eric0308@users.noreply.github.com> Co-authored-by: kalicyh <34980061+kalicyh@users.noreply.github.com> Co-authored-by: TOM88812 <ttangxs0808@163.com> Co-authored-by: HonestQiao <honestqiao@163.com> Co-authored-by: 欣南科技 <huangrongzhuang@xin-nan.com> Co-authored-by: Huang <32005838+openrz@users.noreply.github.com> Co-authored-by: 胡垚 <qsct9501@163.com>
57 lines
No EOL
1.8 KiB
Text
Executable file
57 lines
No EOL
1.8 KiB
Text
Executable file
# 第一阶段:前端构建
|
||
FROM node:18 AS frontend-builder
|
||
|
||
WORKDIR /app/ZhiKongTaiWeb
|
||
|
||
# 配置npm使用淘宝源
|
||
RUN npm config set registry https://registry.npmmirror.com
|
||
|
||
COPY ZhiKongTaiWeb/package*.json ./
|
||
|
||
# 安装axios依赖
|
||
RUN npm install axios
|
||
RUN npm install
|
||
|
||
COPY ZhiKongTaiWeb .
|
||
|
||
RUN npm run build
|
||
|
||
# 第二阶段:构建Python依赖
|
||
FROM python:3.10-slim AS builder
|
||
|
||
WORKDIR /app
|
||
|
||
COPY requirements.txt .
|
||
|
||
# 优化apt安装
|
||
RUN echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware" > /etc/apt/sources.list && \
|
||
echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
|
||
apt-get update && \
|
||
apt-get install -y --no-install-recommends gcc libopus-dev ffmpeg && \
|
||
rm -rf /var/lib/apt/lists/* && \
|
||
# 直接使用系统Python
|
||
pip install --no-cache-dir -r requirements.txt \
|
||
-i https://pypi.tuna.tsinghua.edu.cn/simple
|
||
|
||
# 第三阶段:生产镜像
|
||
FROM python:3.10-slim
|
||
|
||
WORKDIR /opt/xiaozhi-esp32-server
|
||
|
||
# 优化apt安装
|
||
RUN echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware" > /etc/apt/sources.list && \
|
||
echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
|
||
apt-get update && \
|
||
apt-get install -y --no-install-recommends libopus0 ffmpeg && \
|
||
apt-get clean && \
|
||
rm -rf /var/lib/apt/lists/*
|
||
|
||
# 从构建阶段复制Python包和前端构建产物
|
||
COPY --from=builder /usr/local/lib/python3.10/site-packages /usr/local/lib/python3.10/site-packages
|
||
COPY --from=frontend-builder /app/ZhiKongTaiWeb/dist /opt/xiaozhi-esp32-server/manager/static/webui
|
||
|
||
# 复制应用代码
|
||
COPY . .
|
||
|
||
# 启动应用
|
||
CMD ["python", "app.py"] |