docker 笔记总结
docker buildx 安装架构
参考:https://github.com/moby/buildkit/blob/master/docs/multi-platform.md
docker 笔记总结
参考:https://github.com/moby/buildkit/blob/master/docs/multi-platform.md
Springboot Auth
rest-authz-resource-server: Spring Boot REST Service Protected Using Keycloak Authorization Services
Lobechat
使用 Docker Compose 部署 LobeChat 服务端数据库版本
root@iZ2zei23h3vwykyqq9th6oZ:/home/lobe-chat/docker-compose/local# cat docker-compose.yml
name: lobe-chat-database
services:
network-service:
image: alpine
container_name: lobe-network
ports:
- '${MINIO_PORT}:${MINIO_PORT}' # MinIO API
- '9001:9001' # MinIO Console
- '${CASDOOR_PORT}:8000' # Casdoor
- '${LOBE_PORT}:3210' # LobeChat
command: tail -f /dev/null
networks:
- lobe-network
postgresql:
image: pgvector/pgvector:pg16
container_name: lobe-postgres
ports:
- '5432:5432'
volumes:
- './data:/var/lib/postgresql/data'
environment:
- 'POSTGRES_DB=${LOBE_DB_NAME}'
- 'POSTGRES_PASSWORD=${POSTGRES_PASSWORD}'
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 5s
timeout: 5s
retries: 5
restart: always
networks:
- lobe-network
minio:
image: minio/minio
container_name: lobe-minio
network_mode: 'service:network-service'
volumes:
- './s3_data:/etc/minio/data'
environment:
- 'MINIO_ROOT_USER=${MINIO_ROOT_USER}'
- 'MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}'
- 'MINIO_API_CORS_ALLOW_ORIGIN=http://182.92.116.31:${LOBE_PORT}'
restart: always
command: >
server /etc/minio/data --address ":${MINIO_PORT}" --console-address ":9001"
casdoor:
image: casbin/casdoor
container_name: lobe-casdoor
entrypoint: /bin/sh -c './server --createDatabase=true'
network_mode: 'service:network-service'
depends_on:
postgresql:
condition: service_healthy
environment:
RUNNING_IN_DOCKER: 'true'
driverName: 'postgres'
dataSourceName: 'user=postgres password=${POSTGRES_PASSWORD} host=postgresql port=5432 sslmode=disable dbname=casdoor'
origin: 'http://182.92.116.31:${CASDOOR_PORT}'
runmode: 'dev'
volumes:
- ./init_data.json:/init_data.json
lobe:
image: lobehub/lobe-chat-database
container_name: lobe-chat
network_mode: 'service:network-service'
depends_on:
postgresql:
condition: service_healthy
network-service:
condition: service_started
minio:
condition: service_started
casdoor:
condition: service_started
environment:
- 'APP_URL=http://182.92.116.31:3210'
- 'NEXT_AUTH_SSO_PROVIDERS=casdoor'
- 'KEY_VAULTS_SECRET=Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ='
- 'NEXT_AUTH_SECRET=QCtusYE5HEzg1IGy1BMbW4SNgF+yBkcKha4ghUyI6WY='
- 'AUTH_URL=http://182.92.116.31:8800/api/auth'
- 'AUTH_CASDOOR_ISSUER=http://182.92.116.31:8800/'
- 'DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/${LOBE_DB_NAME}'
- 'S3_ENDPOINT=http://182.92.116.31:${MINIO_PORT}'
- 'S3_BUCKET=${MINIO_LOBE_BUCKET}'
- 'S3_PUBLIC_DOMAIN=http://182.90.116.31:${MINIO_PORT}'
- 'S3_ENABLE_PATH_STYLE=1'
- 'LLM_VISION_IMAGE_USE_BASE64=1'
env_file:
- .env
restart: always
volumes:
data:
driver: local
s3_data:
driver: local
networks:
lobe-network:
driver: bridge
nccl
NCCL是一款独立的库,提供标准的 GPU 通信例程,支持全规约(all-reduce)、全收集(all-gather)、规约(reduce)、广播(broadcast)、规约并散播(reduce-scatter)以及任意基于发送/接收的通信模式。该库经过优化,能够在使用 PCIe、NVLink、NVSwitch 以及基于 InfiniBand Verbs 或 TCP/IP 套接字的网络平台上实现高带宽。NCCL 支持任意数量的 GPU,无论是安装在单节点还是跨多个节点的系统中,并且可以在单进程或多进程(如 MPI)应用程序中使用。
MPress: Democratizing Billion-Scale Model Training on Multi-GPU Servers via Memory-Saving Inter-Operator Parallelism
MPress: Democratizing Billion-Scale Model Training on Multi-GPU Servers via Memory-Saving Inter-Operator Parallelism