Skip to main content

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

ComponentsMinimum RequirementsRecommended Configuration
CPU4 cores8 cores
Memory8GB16GB
Architecture Supportamd64/arm64-

Software Dependencies

ComponentsVersion RequirementsVerification CommandsOther Dependencies
Docker Engine≥ 20.10.0docker --version
Docker Compose≥ 2.0.0docker compose version
Kubernetes1.28+ (optional)kubectl version1. 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: always
  • 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 

Instance Access

  1. Instance URL

    See csghub.external_url in docker-compose.yml.

  2. Log in to the csghub container

    docker compose ps && docker exec -it <container> bash 
  3. View the default administrator account password

    cat /etc/csghub/init_root_password

Configuration instructions (from high to low)

  1. 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

  2. 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)

  3. 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
CommandDescription
--helpView help
reconfigureRefresh all service configuration files and restart services as needed
startStart service
restartRestart service
stopStop service
reloadReload service
tailTrack service log
statusView service status
  • csghub-psql: Quick access csghub_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: