DB-GPT Docker Build Guide
This guide provides comprehensive instructions for building DB-GPT Docker images with various configurations using the docker/base/build_image.sh
script.
Overview
The DB-GPT build script allows you to create Docker images tailored to your specific requirements. You can choose from predefined installation modes or customize the build with specific extras, environment variables, and other settings.
Available Installation Modes
- Default
- OpenAI
- VLLM
- Llama-cpp
- Full
CUDA-based image with standard features.
bash docker/base/build_image.sh
Includes: CUDA support, proxy integrations (OpenAI, Ollama, Zhipuai, Anthropic, Qianfan, Tongyi), RAG capabilities, graph RAG, Hugging Face integration, and quantization support.
CPU-based image optimized for OpenAI API usage.
bash docker/base/build_image.sh --install-mode openai
Includes: Basic functionality, all proxy integrations, and RAG capabilities without GPU acceleration.
CUDA-based image with VLLM for optimized inference.
bash docker/base/build_image.sh --install-mode vllm
Includes: All default features plus VLLM support for high-performance inference.
CUDA-based image with Llama-cpp support.
bash docker/base/build_image.sh --install-mode llama-cpp
Includes: All default features plus Llama-cpp and Llama-cpp server with CUDA acceleration enabled via CMAKE_ARGS="-DGGML_CUDA=ON"
.
CUDA-based image with all available features.
bash docker/base/build_image.sh --install-mode full
Includes: All features from other modes plus embedding capabilities.
Basic Usage
View Available Modes
To see all available installation modes and their configurations:
bash docker/base/build_image.sh --list-modes
Get Help
Display all available options:
bash docker/base/build_image.sh --help
Customization Options
Python Version
DB-GPT requires Python 3.10 or higher. The default is Python 3.11, but you can specify a different version:
bash docker/base/build_image.sh --python-version 3.10
Custom Image Name
Set a custom name for the built image:
bash docker/base/build_image.sh --image-name mycompany/dbgpt
Image Name Suffix
Add a suffix to the image name for versioning or environment identification:
bash docker/base/build_image.sh --image-name-suffix v1.0
This will generate eosphorosai/dbgpt-v1.0
for the default mode or eosphorosai/dbgpt-MODE-v1.0
for specific modes.
PIP Mirror
Choose a different PIP index URL:
bash docker/base/build_image.sh --pip-index-url https://pypi.org/simple
Ubuntu Mirror
Control whether to use Tsinghua Ubuntu mirror:
bash docker/base/build_image.sh --use-tsinghua-ubuntu false