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.

build_docker_image.mdx 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. - Developers looking to build a RAGFlow Docker image for an ARM64 platform.
  12. - Testers looking to explore the latest features of RAGFlow in a Docker image.
  13. ## Prerequisites
  14. - CPU ≥ 4 cores
  15. - RAM ≥ 16 GB
  16. - Disk ≥ 50 GB
  17. - Docker ≥ 24.0.0 & Docker Compose ≥ v2.26.1
  18. ## Build a Docker image
  19. <Tabs
  20. defaultValue="without"
  21. values={[
  22. {label: 'Build a Docker image without embedding models', value: 'without'},
  23. {label: 'Build a Docker image including embedding models', value: 'including'}
  24. ]}>
  25. <TabItem value="without">
  26. This image is approximately 2 GB in size and relies on external LLM and embedding services.
  27. :::tip NOTE
  28. While we also test RAGFlow on ARM64 platforms, we do not maintain RAGFlow Docker images for ARM. However, you can build an image yourself on a `linux/arm64` or `darwin/arm64` host machine as well.
  29. :::
  30. ```bash
  31. git clone https://github.com/infiniflow/ragflow.git
  32. cd ragflow/
  33. docker build --build-arg LIGHTEN=1 -f Dockerfile -t infiniflow/ragflow:nightly-slim .
  34. ```
  35. </TabItem>
  36. <TabItem value="including">
  37. This image is approximately 9 GB in size. As it includes embedding models, it relies on external LLM services only.
  38. :::tip NOTE
  39. While we also test RAGFlow on ARM64 platforms, we do not maintain RAGFlow Docker images for ARM. However, you can build an image yourself on a `linux/arm64` or `darwin/arm64` host machine.
  40. :::
  41. ```bash
  42. git clone https://github.com/infiniflow/ragflow.git
  43. cd ragflow/
  44. pip3 install huggingface_hub nltk
  45. python3 download_deps.py
  46. docker build -f Dockerfile.deps -t infiniflow/ragflow_deps .
  47. docker build -f Dockerfile -t infiniflow/ragflow:nightly .
  48. docker build --build-arg LIGHTEN=1 -f Dockerfile -t infiniflow/ragflow:nightly-slim .
  49. ```
  50. </TabItem>
  51. </Tabs>