Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

build_docker_image.mdx 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. ---
  2. sidebar_position: 1
  3. slug: /build_docker_image
  4. ---
  5. # Build a RAGFlow Docker Image
  6. import Tabs from '@theme/Tabs';
  7. import TabItem from '@theme/TabItem';
  8. A guide explaining how to build a RAGFlow Docker image from its source code. By following this guide, you'll be able to create a local Docker image that can be used for development, debugging, or testing purposes.
  9. ## Target Audience
  10. - Developers who have added new features or modified the existing code and require a Docker image to view and debug their changes.
  11. - Testers looking to explore the latest features of RAGFlow in a Docker image.
  12. ## Prerequisites
  13. - CPU ≥ 4 cores
  14. - RAM ≥ 16 GB
  15. - Disk ≥ 50 GB
  16. - Docker ≥ 24.0.0 & Docker Compose ≥ v2.26.1
  17. :::tip NOTE
  18. If you have not installed Docker on your local machine (Windows, Mac, or Linux), see the [Install Docker Engine](https://docs.docker.com/engine/install/) guide.
  19. :::
  20. ## Build a Docker image
  21. <Tabs
  22. defaultValue="without"
  23. values={[
  24. {label: 'Build a Docker image without embedding models', value: 'without'},
  25. {label: 'Build a Docker image including embedding models', value: 'including'}
  26. ]}>
  27. <TabItem value="without">
  28. This image is approximately 1 GB in size and relies on external LLM and embedding services.
  29. ```bash
  30. git clone https://github.com/infiniflow/ragflow.git
  31. cd ragflow/
  32. pip3 install huggingface-hub nltk
  33. python3 download_deps.py
  34. docker build -f Dockerfile.slim -t infiniflow/ragflow:dev-slim .
  35. ```
  36. </TabItem>
  37. <TabItem value="including">
  38. ## Build a Docker image including embedding models
  39. This image is approximately 9 GB in size. As it includes embedding models, it relies on external LLM services only.
  40. ```bash
  41. git clone https://github.com/infiniflow/ragflow.git
  42. cd ragflow/
  43. pip3 install huggingface-hub nltk
  44. python3 download_deps.py
  45. docker build -f Dockerfile -t infiniflow/ragflow:dev .
  46. ```
  47. </TabItem>
  48. <TabItem value="linux/arm64">
  49. ## 🔧 Build a Docker image for linux arm64
  50. We are currently unable to regularly build multi-arch images with CI and have no plans to publish arm64 images in the near future.
  51. However, you can build an image yourself on a linux/arm64 host machine:
  52. ```bash
  53. git clone https://github.com/infiniflow/ragflow.git
  54. cd ragflow/
  55. pip3 install huggingface-hub nltk
  56. python3 download_deps.py
  57. docker build --build-arg ARCH=arm64 -f Dockerfile.slim -t infiniflow/ragflow:dev-slim .
  58. docker build --build-arg ARCH=arm64 -f Dockerfile -t infiniflow/ragflow:dev .
  59. ```
  60. </TabItem>
  61. </Tabs>