Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

Dockerfile.scratch 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. FROM ubuntu:22.04
  2. USER root
  3. WORKDIR /ragflow
  4. RUN apt-get update && apt-get install -y wget curl build-essential libopenmpi-dev
  5. RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
  6. bash ~/miniconda.sh -b -p /root/miniconda3 && \
  7. rm ~/miniconda.sh && ln -s /root/miniconda3/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
  8. echo ". /root/miniconda3/etc/profile.d/conda.sh" >> ~/.bashrc && \
  9. echo "conda activate base" >> ~/.bashrc
  10. ENV PATH /root/miniconda3/bin:$PATH
  11. RUN conda create -y --name py11 python=3.11
  12. ENV CONDA_DEFAULT_ENV py11
  13. ENV CONDA_PREFIX /root/miniconda3/envs/py11
  14. ENV PATH $CONDA_PREFIX/bin:$PATH
  15. RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
  16. RUN apt-get install -y nodejs
  17. RUN apt-get install -y nginx
  18. ADD ./web ./web
  19. ADD ./api ./api
  20. ADD ./conf ./conf
  21. ADD ./deepdoc ./deepdoc
  22. ADD ./rag ./rag
  23. ADD ./requirements.txt ./requirements.txt
  24. ADD ./graph ./graph
  25. RUN apt install openmpi-bin openmpi-common libopenmpi-dev
  26. ENV LD_LIBRARY_PATH /usr/lib/x86_64-linux-gnu/openmpi/lib:$LD_LIBRARY_PATH
  27. RUN rm /root/miniconda3/envs/py11/compiler_compat/ld
  28. RUN cd ./web && npm i --force && npm run build
  29. RUN conda run -n py11 pip install -i https://mirrors.aliyun.com/pypi/simple/ -r ./requirements.txt
  30. RUN apt-get update && \
  31. apt-get install -y libglib2.0-0 libgl1-mesa-glx && \
  32. rm -rf /var/lib/apt/lists/*
  33. RUN conda run -n py11 pip install -i https://mirrors.aliyun.com/pypi/simple/ ollama
  34. RUN conda run -n py11 python -m nltk.downloader punkt
  35. RUN conda run -n py11 python -m nltk.downloader wordnet
  36. ENV PYTHONPATH=/ragflow/
  37. ENV HF_ENDPOINT=https://hf-mirror.com
  38. ADD docker/entrypoint.sh ./entrypoint.sh
  39. RUN chmod +x ./entrypoint.sh
  40. ENTRYPOINT ["./entrypoint.sh"]