You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

пре 1 година
пре 2 недеља
1234567891011121314151617181920212223242526272829303132333435363738
  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. ENV BUILD_PREFIX=/app
  8. ADD . ${BUILD_PREFIX}
  9. RUN apt-get update \
  10. &&apt-get install -y --no-install-recommends bash ffmpeg espeak libavcodec-extra\
  11. && cd ${BUILD_PREFIX} \
  12. && cp config-template.json config.json \
  13. && /usr/local/bin/python -m pip install --no-cache --upgrade pip \
  14. && pip install --no-cache -r requirements.txt \
  15. && pip install --no-cache -r requirements-optional.txt \
  16. && pip install azure-cognitiveservices-speech \
  17. && pip install --no-cache -r ./plugins/sum4all/requirements.txt \
  18. && pip install --no-cache -r ./plugins/file4upload/requirements.txt \
  19. && pip install --no-cache -r ./plugins/healthai/requirements.txt
  20. WORKDIR ${BUILD_PREFIX}
  21. ADD docker/entrypoint.sh /entrypoint.sh
  22. RUN chmod +x /entrypoint.sh \
  23. && mkdir -p /home/noroot \
  24. && groupadd -r noroot \
  25. && useradd -r -g noroot -s /bin/bash -d /home/noroot noroot \
  26. && chown -R noroot:noroot /home/noroot ${BUILD_PREFIX} /usr/local/lib
  27. USER noroot
  28. ENTRYPOINT ["/entrypoint.sh"]