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.

Dockerfile.scratch 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 ./agent ./agent
  25. ADD ./graphrag ./graphrag
  26. RUN apt install openmpi-bin openmpi-common libopenmpi-dev
  27. ENV LD_LIBRARY_PATH /usr/lib/x86_64-linux-gnu/openmpi/lib:$LD_LIBRARY_PATH
  28. RUN rm /root/miniconda3/envs/py11/compiler_compat/ld
  29. RUN cd ./web && npm i --force && npm run build
  30. RUN conda run -n py11 pip install -i https://mirrors.aliyun.com/pypi/simple/ -r ./requirements.txt
  31. RUN apt-get update && \
  32. apt-get install -y libglib2.0-0 libgl1-mesa-glx && \
  33. rm -rf /var/lib/apt/lists/*
  34. RUN conda run -n py11 pip install -i https://mirrors.aliyun.com/pypi/simple/ ollama
  35. RUN conda run -n py11 python -m nltk.downloader punkt
  36. RUN conda run -n py11 python -m nltk.downloader wordnet
  37. ENV PYTHONPATH=/ragflow/
  38. ENV HF_ENDPOINT=https://hf-mirror.com
  39. ADD docker/entrypoint.sh ./entrypoint.sh
  40. RUN chmod +x ./entrypoint.sh
  41. ENTRYPOINT ["./entrypoint.sh"]