171 lines
6.8 KiB
YAML
171 lines
6.8 KiB
YAML
|
# Server Deployment
|
||
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: yudao-server
|
||
|
spec:
|
||
|
replicas: 1
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: yudao-server
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: yudao-server
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: yudao-server
|
||
|
image: crpi-yaxyc8k2krkbnrmv.cn-hangzhou.personal.cr.aliyuncs.com/llm-server/xhllm-server
|
||
|
ports:
|
||
|
- containerPort: 48080
|
||
|
env:
|
||
|
- name: SPRING_PROFILES_ACTIVE
|
||
|
value: "local"
|
||
|
- name: JAVA_OPTS
|
||
|
value: "-Xms512m -Xmx512m -Djava.security.egd=file:/dev/./urandom -Dfile.encoding=UTF-8"
|
||
|
- name: MASTER_DATASOURCE_URL
|
||
|
value: "jdbc:mysql://mysql:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true&useUnicode=true&characterEncoding=UTF-8&connectionCollation=utf8mb4_unicode_ci"
|
||
|
- name: MASTER_DATASOURCE_USERNAME
|
||
|
value: "root"
|
||
|
- name: MASTER_DATASOURCE_PASSWORD
|
||
|
value: "123456"
|
||
|
- name: SLAVE_DATASOURCE_URL
|
||
|
value: "jdbc:mysql://mysql:3306/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true&useUnicode=true&characterEncoding=UTF-8&connectionCollation=utf8mb4_unicode_ci"
|
||
|
- name: SLAVE_DATASOURCE_USERNAME
|
||
|
value: "root"
|
||
|
- name: SLAVE_DATASOURCE_PASSWORD
|
||
|
value: "123456"
|
||
|
- name: REDIS_HOST
|
||
|
value: "redis" # 使用 Redis Service 的名称
|
||
|
- name: REDIS_PORT
|
||
|
value: "6379" # Redis Service 的端口
|
||
|
volumeMounts:
|
||
|
- name: llm-config
|
||
|
mountPath: /app/config/llm_config.yml
|
||
|
subPath: llm_config.yml
|
||
|
volumes:
|
||
|
- name: llm-config
|
||
|
configMap:
|
||
|
name: llm-config
|
||
|
---
|
||
|
# Server Service
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: yudao-server
|
||
|
spec:
|
||
|
ports:
|
||
|
- port: 48080
|
||
|
targetPort: 48080
|
||
|
selector:
|
||
|
app: yudao-server
|
||
|
---
|
||
|
# Server ConfigMap
|
||
|
apiVersion: v1
|
||
|
kind: ConfigMap
|
||
|
metadata:
|
||
|
name: llm-config
|
||
|
data:
|
||
|
llm_config.yml: |
|
||
|
llm:
|
||
|
backend:
|
||
|
#################### 8123: RAG服务、训练集和标注相关API。 ###################
|
||
|
### RAG服务
|
||
|
#RAG健康检查 GET
|
||
|
rag_health: http://36.103.199.248:8123/health
|
||
|
#上传并向量化 POST
|
||
|
rag_embed: http://36.103.199.248:8123/embed
|
||
|
#获取所有向量id GET
|
||
|
rag_ids: http://36.103.199.248:8123/ids
|
||
|
#根据id获取文档 GET
|
||
|
rag_documents: http://36.103.199.248:8123/documents
|
||
|
#根据id删除文档 DEL
|
||
|
rag_documents_del: http://36.103.199.248:8123/documents
|
||
|
#根据file_id检索向量 POST
|
||
|
rag_query: http://36.103.199.248:8123/query
|
||
|
#支持多个文件id查询向量 GET
|
||
|
rag_query_multiple: http://36.103.199.248:8123/query_multiple
|
||
|
# 知识库向量嵌入
|
||
|
embed: http://36.103.199.248:8123/embed
|
||
|
# 知识库查询
|
||
|
embed_query: http://36.103.199.248:8123/query
|
||
|
|
||
|
#### LLM train and service api 训练集、标注相关API
|
||
|
# 训练集列表 GET
|
||
|
dataset_list: http://localhost:8123/api/mgr/datasets/list
|
||
|
# 上传训练集 POST
|
||
|
dataset_create: http://localhost:8123/api/mgr/datasets/create
|
||
|
# 删除训练集 DELETE
|
||
|
dataset_delete: http://localhost:8123/api/mgr/datasets/
|
||
|
# 训练集标注 GET
|
||
|
annotation_task_list: http://localhost:8123/api/mgr/annotation/task/list
|
||
|
# 标注信息 GET
|
||
|
annotation_task: http://localhost:8123/api/mgr/annotation/task
|
||
|
# 保存标注 POST
|
||
|
annotation_task_save: http://localhost:8123/api/mgr/annotation/task/task-6025001b-692c-44a1-9bc7-2a34bd7c0efe/segment/das-2eedd7bf-3770-4816-a961-b30c446b7a4f/mark
|
||
|
|
||
|
#################### 9000: 大模型管理、微调任务、文件上传和模型部署相关API。 ###################
|
||
|
# 大模型列表 GET
|
||
|
models_list: http://36.103.199.248:9000/api/models
|
||
|
# 登录 POST
|
||
|
login: http://36.103.199.248:9000/api/auth/login
|
||
|
account: http://36.103.199.248:9000/api/auth/account
|
||
|
login_username: admin
|
||
|
login_password: admin
|
||
|
# 微调任务详情 GET
|
||
|
finetuning_detail: http://36.103.199.248:9000/api/finetuning
|
||
|
# 微调任务取消
|
||
|
finetuning_cancel: http://36.103.199.248:9000/api/finetuning/%s/cancel
|
||
|
# 微调文件列表 GET
|
||
|
finetuning_file_list: http://36.103.199.248:9000/api/files?purpose=fine-tune
|
||
|
# 模型部署
|
||
|
model_create: http://36.103.199.248:9000/api/models
|
||
|
# aigc模型推理
|
||
|
aigc_model_completions: http://36.103.199.248:9000/api/channels/chat/completions
|
||
|
|
||
|
#################### 5123: 微调任务、模型部署、文件管理、提示词优化、自动评估、文生图等API。 ###################
|
||
|
# 创建微调任务 POST
|
||
|
# 微调文件上传
|
||
|
aigc_file_upload: /api/files
|
||
|
finetuning_create: /llm/finetuning
|
||
|
# 日志获取
|
||
|
finetuning_log: /llm/get_log
|
||
|
# 开始部署
|
||
|
model_deploy: /llm/deploy
|
||
|
# 取消部署
|
||
|
model_undeploy: /llm/deploy/stop?deploy_id=
|
||
|
# aigc表数据查询接口
|
||
|
table_data_query: /table/%s
|
||
|
# 模型文件列表
|
||
|
model_file_list: /models/?path=
|
||
|
# 模型文件下载
|
||
|
model_file_download: /models/download/?file_path=
|
||
|
# 提示词优化
|
||
|
optimize_prompt: http://36.103.199.248:5123/optimize-prompt
|
||
|
# 自动评估
|
||
|
auto_evaluation: /llm-eval
|
||
|
# 文生图
|
||
|
text_to_image: http://36.103.199.248:5123/generate-image
|
||
|
# 检查点文件列表
|
||
|
check_file_list: /llm/finetuning/checkpoints?model_name=
|
||
|
# 模型调优停止 POST
|
||
|
stop_finetuning: /llm/finetuning/stop
|
||
|
# 基座模型状态 POST
|
||
|
base_model_status: http://36.103.199.248:5123/llm/deploy/list
|
||
|
# 模型部署 POST
|
||
|
deploy_model: http://36.103.199.248:5123/llm/deploy
|
||
|
# 模型删除
|
||
|
delete_model: http://36.103.199.248:5123/llm/deploy/stop
|
||
|
|
||
|
#################### 30000: 大模型对话相关API。 ###################
|
||
|
#### 大模型对话
|
||
|
# 模型列表 GET
|
||
|
base_model_list: http://36.103.199.248:30000/model/v1/models
|
||
|
# 模型对话 POST
|
||
|
model_completions: http://36.103.199.248:30000/v1/chat/completions
|
||
|
|
||
|
#################### 48080: 应用和管理服务相关API。 ###################
|
||
|
application_api: http://localhost:48080/admin-api/llm/application/api/apiKey/chat
|
||
|
|
||
|
model_service_api: http://localhost:48080/admin-api/llm/model-service/api/apiKey/chat
|