From a5c8315c21c03cdd3b980a256c6da28773891e52 Mon Sep 17 00:00:00 2001
From: kalicyh <34980061+kaliCYH@users.noreply.github.com>
Date: Tue, 18 Feb 2025 15:45:58 +0800
Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=88=20perf:=20=E4=BC=98=E5=8C=96?=
=?UTF-8?q?=E6=89=93=E5=8C=85=E9=80=9F=E5=BA=A6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
注释日志的时间信息
---
Dockerfile | 20 ++++++++++----------
config/logger.py | 2 +-
docker-compose.yml | 5 +++--
3 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index 4d0c3009c..94e9b7630 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -11,7 +11,7 @@ COPY ZhiKongTaiWeb .
RUN yarn build
# 第二阶段:构建 Python 依赖
-FROM ccr.ccs.tencentyun.com/kalicyh/poetry:v3.10_latest AS builder
+FROM ccr.ccs.tencentyun.com/kalicyh/poetry:v3.10_xiaozhi AS builder
WORKDIR /app
@@ -20,15 +20,15 @@ COPY . .
# 检查是否有缺失
RUN poetry install --no-root
-# 使用清华源加速apt安装
-RUN rm -rf /etc/apt/sources.list.d/* && \
- 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 && \
- echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
- echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security 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
+# 使用清华源加速apt安装,该镜像内置所以注释
+# RUN rm -rf /etc/apt/sources.list.d/* && \
+# 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 && \
+# echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware" >> /etc/apt/sources.list && \
+# echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security 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
# 从构建阶段复制虚拟环境和前端构建产物
COPY --from=frontend-builder /app/ZhiKongTaiWeb/dist /app/manager/static/webui
diff --git a/config/logger.py b/config/logger.py
index d4e87bc64..8a5a3e6ea 100644
--- a/config/logger.py
+++ b/config/logger.py
@@ -9,7 +9,7 @@ def setup_logging(log_dir='tmp', data_dir='data'):
# 设置日志格式,时间、日志级别、标签、消息
log_format = (
- "{time:YYYY-MM-DD HH:mm:ss}"
+ # "{time:YYYY-MM-DD HH:mm:ss}"
"[{extra[tag]}]"
" - {level} - "
"{message}"
diff --git a/docker-compose.yml b/docker-compose.yml
index efd18be16..58e8417a8 100755
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,11 +1,12 @@
services:
xiaozhi-esp32-server:
- image: ccr.ccs.tencentyun.com/xinnan/xiaozhi-esp32-server:latest
+ image: ccr.ccs.tencentyun.com/kalicyh/esp32-ai-server:latest
container_name: xiaozhi-esp32-server
restart: always
#security_opt:
# - seccomp:unconfined
ports:
- "8000:8000"
+ - "8002:8002"
volumes:
- - ./.config.yaml:/opt/xiaozhi-esp32-server/config.yaml
\ No newline at end of file
+ - ./data:/app/data
\ No newline at end of file