Skip to content

Latest commit

 

History

History
executable file
·
91 lines (67 loc) · 1.62 KB

File metadata and controls

executable file
·
91 lines (67 loc) · 1.62 KB

動態增加執行的參數

MYSQL

!!! 格式1

services:
  mysql:
    command: [
      "--ssl=OFF",
      "--max-allowed-packet=16M",
      "--join-buffer-size=32M",
      "--innodb-file-per-table=ON",
      "--innodb-buffer-pool-size=8G",
      "--innodb-doublewrite=OFF",
      "--innodb-flush-log-at-trx-commit=2",
      # --- 新增優化參數 ---
      "--innodb-flush-log-at-timeout=3",
      "--innodb-read-io-threads=32",
      "--innodb-write-io-threads=16",
      "--innodb-io-capacity=5000",
      "--innodb-io-capacity-max=10000",
      "--innodb-lock-wait-timeout=50",
      "--tmp-table-size=512M",
      "--max-heap-table-size=512M",
      "--character-set-server=utf8mb4",
      "--collation-server=utf8mb4_unicode_ci"
    ]

!!! 格式2

services:
  db:
    command:
      - mysqld
      - --innodb-file-per-table=1
      - --lower-case-table-names=0
      - --character-set-server=utf8mb4
      - --collation-server=utf8mb4_unicode_ci

llama.cpp

參數用到空白時, 需要分開

原始參數 --host 0.0.0.0 -port 8080 --threads 56

services:
  gemma3:
    command:
      - "--host"
      - "0.0.0.0"
      - "--port"
      - "8080"
      - "-m"
      - "/models/google_gemma-3-12b-it-Q4_K_M.gguf"
      - "--threads"
      - "56"
      - "--mlock"
#      - "--numa"
      - "--ctx-size"
      - "4096"
      - "--batch-size"
      - "128"
      - "--no-context-shift"

litellm

services:
  litellm:
    command: [ "--config", "/app/config.yaml", "--port", "4000", "--num_workers", "16"]