Docker
Advantages
Simplified Management: All service dependencies are uniformly orchestrated through Docker Compose
Quick Deployment: Start the complete CSGHub service stack with one click
Flexible Expansion: Support horizontal expansion of service instances, adjust resource configuration and service scale on demand
Production Ready: Meet the application deployment requirements of small and medium-sized enterprises
Tip: It is recommended to use Docker Compose for installation.
Applicable Scenarios
- Quickly build a CSGHub demonstration environment
- Quickly verify CSGHub functions
- Development and test environment deployment
- Small and medium-scale production environment deployment
Functional Description
Two startup modes are provided according to the configuration complexity:
Basic Function: All functions except model evaluation, reasoning, fine-tuning, application space, and MCP (the above functions rely on Kubernetes clusters).
Complete Function: Contains all ce/ee functions
Note: When accessing using an IP address, MCP functionality will be limited (this functionality requires domain name support).
System Requirements
Hardware Configuration
Components | Minimum Requirements | Recommended Configuration |
---|---|---|
CPU | 4 cores | 8 cores |
Memory | 8GB | 16GB |
Architecture Support | amd64/arm64 | - |
Software Dependencies
Components | Version Requirements | Verification Commands | Other Dependencies |
---|---|---|---|
Docker Engine | ≥ 20.10.0 | docker --version | |
Docker Compose | ≥ 2.0.0 | docker compose version | |
Kubernetes | 1.28+ (optional) | kubectl version | 1. Enabling Starship requires Kubernetes to support RWX storage classes 2. GPU support requires pre-installation of Device Plugin 3. It is best to support Dynamic Volume Provisioning |
Note: Enabling full functionality requires Kubernetes, otherwise model evaluation, reasoning, fine-tuning, MCP, application space and other functions will not be available.
Installation and Deployment
Edition CE
docker-compose.yml
services:
csghub:
image: opencsg-registry.cn-beijing.cr.aliyuncs.com/opencsg_public/omnibus-csghub:v1.8.0-ce
environment:
CSGHUB_OMNIBUS_CONFIG: |
csghub:
external_url: "http://csghub.example.com" # Access the CSGHub instance domain name. It is recommended to configure it using the domain name.
notification:
enable: false
runner:
enable: true # Whether to enable the Runner service. If disabled, only basic functions can be used.
deploy:
knative:
services:
- type: "NodePort" # If your Kubernetes cluster supports LoadBalancer, you can use LoadBalancer
domain: "app.internal" # Customize Knative Serving internal domain name
host: "192.168.18.10" # Expose the EXTERNAL-IP of the kourier service
port: 30123 # Custom port number, type=LoadBalancer, please specify 80
ports:
- '80:80' # Nginx
- '2222:2222' # Git Over SSH
- '5000:5000' # Container Registry
- '8000:8000' # Casdoor
- '9000:9000' # Minio
volumes:
- ./csghub/etc:/etc/csghub
- ./csghub/logs:/var/log/csghub
- ./csghub/data:/var/opt/csghub
- ./csghub/.kube:/etc/csghub/.kube
restart: always
shm_size: '256m'Start Service
docker compose up -d && docker compose ps
Note: If the Kubernetes cluster is not ready, please set
environment.CSGHUB_OMNIBUS_CONFIG.runner.enable=false
(that is, install and use basic functions).Stop Service
docker compose down
Edition EE
docker-compose.yml
services:
csghub:
image: opencsg-registry.cn-beijing.cr.aliyuncs.com/opencsg_public/omnibus-csghub:v1.8.0-ee
environment:
CSGHUB_OMNIBUS_CONFIG: |
csghub:
external_url: "http://csghub.example.com" # Access the CSGHub instance domain name. It is recommended to configure it using the domain name.
runner:
enable: true # Whether to enable the Runner service. If disabled, only basic functions can be used.
deploy:
knative:
services:
- type: "NodePort" # If your Kubernetes cluster supports LoadBalancer, you can use LoadBalancer
domain: "app.internal" # Customize Knative Serving internal domain name
host: "192.168.18.10" # Expose the EXTERNAL-IP of the kourier service
port: 30123 # Custom port number, type=LoadBalancer, please specify 80
server:
dataflow:
address: "http://dataflow:8000" # Dataflow Address
starship:
enable: true # Enable Starship Coding Assistant
- '80:80' # Nginx
- '2222:2222' # Git Over SSH
- '5000:5000' # Container Registry
- '8000:8000' # Casdoor
- '8001:8001' # Starship Portal
- '8002:8002' # Starship-API Admin Console
- '9000:9000' # Minio
- '9001:9001' # Minio Admin UI
volumes:
- ./csghub/etc:/etc/csghub
- ./csghub/logs:/var/log/csghub
- ./csghub/data:/var/opt/csghub
- ./csghub/.kube:/etc/csghub/.kube
restart: always
shm_size: '256m'
dataflow: # Dataflow is a CSGHub dataset processing module and can be enabled on demand
image: opencsg-registry.cn-beijing.cr.aliyuncs.com/opencsg_public/dataflow:latest
environment:
CSGHUB_ENDPOINT: "http://csghub.example.com"
DATABASE_HOSTNAME: "csghub"
DATABASE_PORT: "5432"
DATABASE_USERNAME: "dataflow"
DATABASE_PASSWORD: "8f444970fcde559c"
DATABASE_DB: "dataflow"
DATA_DIR: "/data"
MAX_WORKERS: 50
RAY_ADDRESS: "auto"
RAY_ENABLE: false
RAY_LOG_DIR: "/var/log/dataflow"
API_SERVER: "0.0.0.0"
API_PORT: 8000
AZURE_OPENAI_ENDPOINT: "$AZURE_OPENAI_ENDPOINT"
AZURE_OPENAI_API_KEY: "$AZURE_OPENAI_ENDPOINT"
OPENAI_API_VERSION: "$OPENAI_API_VERSION"
AZURE_MODEL: "$AZURE_MODEL"
ENABLE_OPENTELEMETRY: false
volumes:
- ./csghub/data/dataflow:/data
- ./csghub/logs/dataflow:/var/log/dataflow
restart: alwaysStart Service
docker compose up -d && docker compose ps
Note: If the Kubernetes cluster is not ready, please set
environment.CSGHUB_OMNIBUS_CONFIG.runner.enable=false
(that is, install and use basic functions).Stop Service
docker compose down
Instance Access
Instance URL
See
csghub.external_url
in docker-compose.yml.Log in to the csghub container
docker compose ps && docker exec -it <container> bash
View the default administrator account password
cat /etc/csghub/init_root_password
Configuration instructions (from high to low)
Environment variable configuration
CSGHUB_OMNIBUS_CONFIG
Function: Inject dynamic configuration parameters when starting Docker Compose Features: It has the highest priority and will overwrite the same parameters of other configuration sources Usage scenario: Suitable for parameter injection during temporary adjustment or containerized deployment
Main configuration file
/etc/csghub/csghub.yaml
Content: Complete parameter set, supports all configurable items Suggestion: Only modify key parameters as needed, unconfigured items automatically inherit default values Permissions: It is recommended to retain the system default permissions (usually requires root permissions to modify)
Default configuration baseline
/opt/csghub/etc/csghub/default.yaml
Function: Provides baseline default values for all parameters Features:
- Lowest priority, only effective when other configurations are undefined
- Direct modification is not recommended (may be overwritten during upgrade)
- Can be used as a configuration template reference
For detailed configuration, please refer to: csghub.yaml.sample.
Service Management
csghub-ctl
Command | Description |
---|---|
--help | View help |
reconfigure | Refresh all service configuration files and restart services as needed |
start | Start service |
restart | Restart service |
stop | Stop service |
reload | Reload service |
tail | Track service log |
status | View service status |
csghub-psql
: Quick accesscsghub_server
database
About .kube/config
.kube/config
file is an important configuration file for accessing Kubernetes clusters. CSGHub will rely on this file when running.
About external services
By default, the following components will be automatically configured through runner.deploy.autoConfigure=true
. This configuration depends on the runner.deploy.knative.services[]
parameter passed in when starting the service. If there are some reasons why the automatic configuration cannot be completed, you can try to manually install and configure it in the following ways:
Feedback
If you encounter any problems during use, you can submit feedback through the following methods: