sidebar_position: 1
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.
:::tip NOTE If you have not installed Docker on your local machine (Windows, Mac, or Linux), see the Install Docker Engine guide. :::
To build a RAGFlow Docker image from source code:
git clone https://github.com/infiniflow/ragflow.git
cd ragflow
Navigate to the ragflow directory where the Dockerfile and other necessary files are located. Now you can build the Docker image using the provided Dockerfile. The command below specifies which Dockerfile to use and tags the image with a name for reference purpose.
infiniflow/ragflow:dev-slimOn a linux/amd64 host:
docker build -f Dockerfile.slim -t infiniflow/ragflow:dev-slim-amd64 .
docker push infiniflow/ragflow:dev-slim-amd64
On a linux/arm64 host:
docker build -f Dockerfile.slim -t infiniflow/ragflow:dev-slim-arm64 .
docker push infiniflow/ragflow:dev-slim-arm64
On a Linux host:
docker manifest create infiniflow/ragflow:dev-slim --amend infiniflow/ragflow:dev-slim-amd64 --amend infiniflow/ragflow:dev-slim-arm64
docker manifest push infiniflow/ragflow:dev-slim
This image is approximately 1 GB in size and relies on external LLM services, as it does not include deepdoc, embedding, or chat models.
infiniflow/ragflow:devOn a linux/amd64 host:
pip3 install huggingface-hub
python3 download_deps.py
docker build -f Dockerfile -t infiniflow/ragflow:dev-amd64 .
docker push infiniflow/ragflow:dev-amd64
On a linux/arm64 host:
pip3 install huggingface-hub
python3 download_deps.py
docker build -f Dockerfile -t infiniflow/ragflow:dev-arm64 .
docker push infiniflow/ragflow:dev-arm64
On any linux host:
docker manifest create infiniflow/ragflow:dev --amend infiniflow/ragflow:dev-amd64 --amend infiniflow/ragflow:dev-arm64
docker manifest push infiniflow/ragflow:dev
This image’s size is approximately 9 GB in size and can reference via either local CPU/GPU or an external LLM, as it includes deepdoc, embedding, and chat models.