mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-05-06 21:52:54 +08:00
* feature(llm): add llm-list details, add autostart for llm-save-instant-model * fix(llm): adjust some interfaces * fix: name-dup problem when create llm * fix: install instant-model by id rather than modelID * fix(llm): add llm_id for mcp-agent * feature(llm): move network from sku to instance * feature(llm): add LLMType for llm-image * feature(llm): add gpuMemoryRequired & ollama-registry yaml * feature(llm): add url-get interface * feature(llm): support mcp in mcp-agent-chat * fix(llm): abstract ollama registry
60 lines
1.3 KiB
Bash
60 lines
1.3 KiB
Bash
#!/bin/bash
|
|
# 用法:
|
|
# ./sync-images.sh <targetRegistry>
|
|
# 示例:
|
|
# ./sync-images.sh crpi-nf3abu98o8qf9y2x.cn-beijing.personal.cr.aliyuncs.com/eikoh
|
|
|
|
set -euo pipefail
|
|
|
|
if [ $# -ne 1 ]; then
|
|
echo "用法: $0 <targetRegistry>"
|
|
echo "例如: $0 crpi-nf3abu98o8qf9y2x.cn-beijing.personal.cr.aliyuncs.com/eikoh"
|
|
exit 1
|
|
fi
|
|
|
|
TARGET_REGISTRY="$1"
|
|
SOURCE_REGISTRY="docker.io"
|
|
|
|
# ----------------------------
|
|
# 要同步的镜像列表
|
|
# ----------------------------
|
|
IMAGES=(
|
|
"nginx:latest"
|
|
"redis:6-alpine"
|
|
"postgres:15-alpine"
|
|
"langgenius/dify-api:1.7.2"
|
|
"langgenius/dify-sandbox:0.2.12"
|
|
"langgenius/dify-plugin-daemon:0.2.0-local"
|
|
"langgenius/dify-web:1.7.2"
|
|
"ubuntu/squid:latest"
|
|
"semitechnologies/weaviate:1.19.0"
|
|
)
|
|
|
|
for image in "${IMAGES[@]}"; do
|
|
# 拆分 name 和 tag
|
|
if [[ "$image" == *":"* ]]; then
|
|
name="${image%%:*}" # 冒号前
|
|
tag="${image##*:}" # 冒号后
|
|
else
|
|
name="$image"
|
|
tag="latest"
|
|
fi
|
|
|
|
short_name="${name##*/}" # 目标镜像只取最后一级名字
|
|
|
|
SRC="docker://${SOURCE_REGISTRY}/${name}:${tag}"
|
|
DST="docker://${TARGET_REGISTRY}/${short_name}:${tag}"
|
|
|
|
echo
|
|
echo "Sync dify image"
|
|
echo " Source: ${SRC}"
|
|
echo " Target: ${DST}"
|
|
echo
|
|
|
|
skopeo copy --override-os linux --override-arch amd64 "${SRC}" "${DST}"
|
|
|
|
echo "Completed: ${short_name}:${tag}"
|
|
done
|
|
|
|
echo "All images sync completed"
|