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

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