2025-02-06 02:08:58 +08:00
|
|
|
FROM python:3.10-slim
|
2025-02-02 23:01:14 +08:00
|
|
|
|
|
|
|
|
RUN apt-get update \
|
|
|
|
|
&& apt-get upgrade -y \
|
2025-02-06 02:08:58 +08:00
|
|
|
&& apt-get install -y libopus-dev ffmpeg \
|
2025-02-02 23:01:14 +08:00
|
|
|
&& apt-get clean \
|
|
|
|
|
&& apt-get autoremove -y
|
|
|
|
|
|
|
|
|
|
# Set working directory
|
|
|
|
|
WORKDIR /opt/xiaozhi-es32-server
|
|
|
|
|
|
2025-02-06 02:08:58 +08:00
|
|
|
COPY . /opt/xiaozhi-es32-server
|
|
|
|
|
|
2025-02-02 23:01:14 +08:00
|
|
|
# Clean unnecessary files to reduce image size
|
2025-02-06 02:08:58 +08:00
|
|
|
RUN pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
|
|
|
|
|
|
2025-02-02 23:01:14 +08:00
|
|
|
## Start the application
|
2025-02-06 02:08:58 +08:00
|
|
|
CMD ["python", "app.py"]
|