2024-10-24 16:24:48 +08:00
|
|
|
# Copyright 2023 OpenSPG Authors
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
|
|
|
# in compliance with the License. You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software distributed under the License
|
|
|
|
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
|
|
|
# or implied.
|
2025-04-17 16:51:58 +08:00
|
|
|
alias docker=podman
|
2024-10-24 16:24:48 +08:00
|
|
|
IMAGE="spg-registry.cn-hangzhou.cr.aliyuncs.com/spg/openspg-python"
|
2025-01-08 11:04:19 +08:00
|
|
|
VERSION="0.6"
|
|
|
|
LATEST="latest"
|
|
|
|
|
2024-10-24 16:24:48 +08:00
|
|
|
cd ../../../../
|
2025-04-17 16:51:58 +08:00
|
|
|
docker build -f openspg/dev/release/python/Dockerfile --platform linux/arm64/v8 --build-arg MINICONDA_FILE=Miniconda3-py310_25.1.1-2-Linux-aarch64.sh --push \
|
|
|
|
-t ${IMAGE}:${VERSION}-arm64 \
|
|
|
|
.
|
|
|
|
docker build -f openspg/dev/release/python/Dockerfile --platform linux/amd64 --build-arg MINICONDA_FILE=Miniconda3-py310_25.1.1-2-Linux-x86_64.sh --push \
|
|
|
|
-t ${IMAGE}:${VERSION}-amd64 \
|
|
|
|
.
|
|
|
|
|
|
|
|
if docker manifest inspect ${IMAGE}:${VERSION} &>/dev/null; then
|
|
|
|
echo "Manifest already exists, removing it..."
|
|
|
|
docker manifest rm ${IMAGE}:${VERSION}
|
2024-10-24 16:24:48 +08:00
|
|
|
else
|
2025-04-17 16:51:58 +08:00
|
|
|
echo "Manifest does not exist, proceeding with creation and push."
|
2024-10-24 16:24:48 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
docker manifest create \
|
2025-04-17 16:51:58 +08:00
|
|
|
${IMAGE}:${VERSION} \
|
|
|
|
${IMAGE}:${VERSION}-amd64 \
|
|
|
|
${IMAGE}:${VERSION}-arm64
|
2024-10-24 16:24:48 +08:00
|
|
|
|
2025-04-17 16:51:58 +08:00
|
|
|
docker manifest push ${IMAGE}:${VERSION}
|
2024-10-31 23:28:51 -07:00
|
|
|
|
2025-04-17 16:51:58 +08:00
|
|
|
if docker manifest inspect ${IMAGE}:${LATEST} &>/dev/null; then
|
|
|
|
echo "Manifest already exists, removing it..."
|
|
|
|
docker manifest rm ${IMAGE}:${LATEST}
|
2024-10-31 23:28:51 -07:00
|
|
|
else
|
2025-04-17 16:51:58 +08:00
|
|
|
echo "Manifest does not exist, proceeding with creation and push."
|
2024-10-31 23:28:51 -07:00
|
|
|
fi
|
|
|
|
|
|
|
|
docker manifest create \
|
2025-04-17 16:51:58 +08:00
|
|
|
${IMAGE}:${LATEST} \
|
|
|
|
${IMAGE}:${VERSION}-amd64 \
|
|
|
|
${IMAGE}:${VERSION}-arm64
|
2024-10-31 23:28:51 -07:00
|
|
|
|
2025-04-17 16:51:58 +08:00
|
|
|
docker manifest push ${IMAGE}:${LATEST}
|