mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-29 05:09:46 +01:00
add: 部署文件
This commit is contained in:
parent
d6c53c7c08
commit
a14f36ad90
1 changed files with 14 additions and 1 deletions
15
Dockerfile
15
Dockerfile
|
|
@ -11,7 +11,6 @@ ARG DEPENDENCIES=" \
|
|||
libsox-dev \
|
||||
build-essential \
|
||||
cmake \
|
||||
libopus0 \
|
||||
libasound-dev \
|
||||
portaudio19-dev \
|
||||
libportaudio2 \
|
||||
|
|
@ -41,6 +40,20 @@ WORKDIR /opt/xiaozhi-es32-server
|
|||
# 从构建阶段复制虚拟环境
|
||||
COPY --from=builder /opt/venv /opt/venv
|
||||
|
||||
# 安装运行时依赖
|
||||
ARG DEPENDENCIES=" \
|
||||
libopus0 \
|
||||
ffmpeg"
|
||||
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
||||
set -ex \
|
||||
&& rm -f /etc/apt/apt.conf.d/docker-clean \
|
||||
&& echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' >/etc/apt/apt.conf.d/keep-cache \
|
||||
&& apt-get update \
|
||||
&& apt-get -y install --no-install-recommends ${DEPENDENCIES} \
|
||||
&& echo "no" | dpkg-reconfigure dash
|
||||
|
||||
# 设置虚拟环境路径
|
||||
ENV PATH="/opt/venv/bin:$PATH"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue