Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

46 lines
1.3KB

  1. FROM python:3.10-slim-bullseye
  2. LABEL maintainer="foo@bar.com"
  3. ARG TZ='Asia/Shanghai'
  4. ARG CHATGPT_ON_WECHAT_VER
  5. # RUN echo /etc/apt/sources.list
  6. RUN sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list
  7. # Set the timezone and configure tzdata
  8. RUN apt-get update \
  9. && apt-get install -y --no-install-recommends tzdata \
  10. && ln -sf /usr/share/zoneinfo/$TZ /etc/localtime \
  11. && dpkg-reconfigure --frontend noninteractive tzdata \
  12. && apt-get clean
  13. ENV BUILD_PREFIX=/app
  14. ADD . ${BUILD_PREFIX}
  15. RUN apt-get update \
  16. &&apt-get install -y --no-install-recommends bash ffmpeg espeak libavcodec-extra\
  17. && cd ${BUILD_PREFIX} \
  18. && cp config-template.json config.json \
  19. && /usr/local/bin/python -m pip install --no-cache --upgrade pip \
  20. && pip install --no-cache -r requirements.txt \
  21. && pip install --no-cache -r requirements-optional.txt \
  22. && pip install azure-cognitiveservices-speech \
  23. && pip install --no-cache -r ./plugins/healthai/requirements.txt
  24. WORKDIR ${BUILD_PREFIX}
  25. ADD docker/entrypoint.sh /entrypoint.sh
  26. RUN chmod +x /entrypoint.sh \
  27. && mkdir -p /home/noroot \
  28. && groupadd -r noroot \
  29. && useradd -r -g noroot -s /bin/bash -d /home/noroot noroot \
  30. && chown -R noroot:noroot /home/noroot ${BUILD_PREFIX} /usr/local/lib
  31. USER noroot
  32. ENTRYPOINT ["/entrypoint.sh"]