update:增加docker

This commit is contained in:
hrz
2025-02-06 02:08:58 +08:00
parent 62752a3fc7
commit f72656b3b9
5 changed files with 246 additions and 30 deletions
+7 -10
View File
@@ -1,21 +1,18 @@
FROM python:3.9.21-slim
FROM python:3.10-slim
ENV LC_ALL=zh_CN.UTF-8 \
LANG=zh_CN.UTF-8 \
LANGUAGE=zh_CN.UTF-8
# Replace single RUN commands with a single RUN command to reduce layers
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y libgomp1 libgl1-mesa-glx libglib2.0-0 \
&& apt-get install -y libopus-dev ffmpeg \
&& apt-get clean \
&& apt-get autoremove -y
# Set working directory
WORKDIR /opt/xiaozhi-es32-server
COPY . /opt/xiaozhi-es32-server
# Clean unnecessary files to reduce image size
RUN pip install -r requirements.txt
#
RUN pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
## Start the application
CMD ["python", "Application.py"]
CMD ["python", "app.py"]