ragflow/docs/guides/develop/build_docker_image.mdx
safipatel 7a7f98b1a9
Reverted build slim image documentation (#4687)
### Fixed documentation for building docker image

I'm assuming that this was a mistake (but I could be missing something)
[here](https://github.com/infiniflow/ragflow/pull/4658/files#:~:text=docker%20build%20%2D%2Dbuild%2Darg%20LIGHTEN%3D1%20%2Df%20Dockerfile%20%2Dt%20infiniflow/ragflow%3Anightly%2Dslim%20.)
when the docker building instructions for the slim image was just
changed away from an actual `docker build` command to the mac os `docker
compose up` command. This is just reverting the change.

### Type of change

- [X] Documentation Update
2025-02-05 10:35:08 +08:00

69 lines
2.2 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.
- Developers looking to build a RAGFlow Docker image for an ARM64 platform.
- 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
## 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 2 GB in size and relies on external LLM and embedding services.
:::tip NOTE
While we also test RAGFlow on ARM64 platforms, we do not plan to maintain RAGFlow Docker images for ARM. However, you can build an image yourself on a `linux/arm64` or `darwin/arm64` host machine as well.
:::
```bash
git clone https://github.com/infiniflow/ragflow.git
cd ragflow/
docker build --build-arg LIGHTEN=1 -f Dockerfile -t infiniflow/ragflow:nightly-slim .
```
</TabItem>
<TabItem value="including">
This image is approximately 9 GB in size. As it includes embedding models, it relies on external LLM services only.
:::tip NOTE
While we also test RAGFlow on ARM64 platforms, we do not plan to maintain RAGFlow Docker images for ARM. However, you can build an image yourself on a `linux/arm64` or `darwin/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 -f Dockerfile.deps -t infiniflow/ragflow_deps .
docker build -f Dockerfile -t infiniflow/ragflow:nightly .
docker build --build-arg LIGHTEN=1 -f Dockerfile -t infiniflow/ragflow:nightly-slim .
```
</TabItem>
</Tabs>