mirror of
				https://github.com/infiniflow/ragflow.git
				synced 2025-10-31 17:59:43 +00:00 
			
		
		
		
	 9d395ab74e
			
		
	
	
		9d395ab74e
		
			
		
	
	
	
	
		
			
			### What problem does this PR solve? Added doc for switching elasticsearch to infinity ### Type of change - [x] New Feature (non-breaking change which adds functionality) - [x] Documentation Update
		
			
				
	
	
		
			81 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			81 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| ---
 | |
| sidebar_position: 1
 | |
| slug: /build_docker_image
 | |
| ---
 | |
| 
 | |
| # Build a RAGFlow Docker Image
 | |
| import Tabs from '@theme/Tabs';
 | |
| import TabItem from '@theme/TabItem';
 | |
| 
 | |
| 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.
 | |
| 
 | |
| ## Target Audience
 | |
| 
 | |
| - Developers who have added new features or modified the existing code and require a Docker image to view and debug their changes.
 | |
| - Testers looking to explore the latest features of RAGFlow in a Docker image.
 | |
| 
 | |
| ## Prerequisites
 | |
| 
 | |
| - CPU ≥ 4 cores
 | |
| - RAM ≥ 16 GB
 | |
| - Disk ≥ 50 GB
 | |
| - Docker ≥ 24.0.0 & Docker Compose ≥ v2.26.1
 | |
| 
 | |
| :::tip NOTE
 | |
| 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.
 | |
| :::
 | |
| 
 | |
| ## Build a Docker image
 | |
| 
 | |
| <Tabs
 | |
|   defaultValue="without"
 | |
|   values={[
 | |
|     {label: 'Build a Docker image without embedding models', value: 'without'},
 | |
|     {label: 'Build a Docker image including embedding models', value: 'including'}
 | |
|   ]}>
 | |
|   <TabItem value="without">
 | |
| 
 | |
| This image is approximately 1 GB in size and relies on external LLM and embedding services.
 | |
| 
 | |
| ```bash
 | |
| git clone https://github.com/infiniflow/ragflow.git
 | |
| cd ragflow/
 | |
| pip3 install huggingface-hub nltk
 | |
| python3 download_deps.py
 | |
| docker build -f Dockerfile.slim -t infiniflow/ragflow:dev-slim .
 | |
| ```
 | |
| 
 | |
|   </TabItem>
 | |
|   <TabItem value="including">
 | |
| 
 | |
| ## Build a Docker image including embedding models
 | |
| 
 | |
| This image is approximately 9 GB in size. As it includes embedding models, it relies on external LLM services only.  
 | |
| 
 | |
| ```bash
 | |
| git clone https://github.com/infiniflow/ragflow.git
 | |
| cd ragflow/
 | |
| pip3 install huggingface-hub nltk
 | |
| python3 download_deps.py
 | |
| docker build -f Dockerfile -t infiniflow/ragflow:dev .
 | |
| ```
 | |
| 
 | |
|   </TabItem>
 | |
|   <TabItem value="linux/arm64">
 | |
| 
 | |
| ## 🔧 Build a Docker image for linux arm64
 | |
| 
 | |
| We are currently unable to regularly build multi-arch images with CI and have no plans to publish arm64 images in the near future.  
 | |
| However, you can build an image yourself on a linux/arm64 host machine:
 | |
| 
 | |
| ```bash
 | |
| git clone https://github.com/infiniflow/ragflow.git
 | |
| cd ragflow/
 | |
| pip3 install huggingface-hub nltk
 | |
| python3 download_deps.py
 | |
| docker build --build-arg ARCH=arm64 -f Dockerfile.slim -t infiniflow/ragflow:dev-slim .
 | |
| docker build --build-arg ARCH=arm64 -f Dockerfile -t infiniflow/ragflow:dev .
 | |
| ```
 | |
|   </TabItem>
 | |
| 
 | |
| </Tabs> |