Skip to content

Commit

Permalink
update scripts to modify image name in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
tenzen-y committed Nov 14, 2021
1 parent 39a1591 commit 3561aac
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,4 @@ spec:
- "/opt/tf-mnist-with-summaries/mnist.py"
- "--log_dir=/train/metrics"
- "--learning_rate=${trialParameters.learningRate}"
- "--max_steps=1"
restartPolicy: Never
2 changes: 1 addition & 1 deletion scripts/v1beta1/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ TAG=$2
ARCH=$3

if [[ -z "$REGISTRY" || -z "$TAG" || -z "$ARCH" ]]; then
echo "Image registry, tag and architecture must be set"
echo "Image registry, tag and cpu-architecture must be set"
echo "Usage: $0 <image-registry> <image-tag> <cpu-architecture>" 1>&2
exit 1
fi
Expand Down
43 changes: 23 additions & 20 deletions scripts/v1beta1/push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,72 +36,75 @@ echo "Image tag: ${TAG}"

# Katib core images
echo -e "\nPushing Katib controller image...\n"
docker push ${REGISTRY}/katib-controller:${TAG}
docker push "${REGISTRY}/katib-controller:${TAG}"

echo -e "\nPushing Katib DB manager image...\n"
docker push ${REGISTRY}/katib-db-manager:${TAG}
docker push "${REGISTRY}/katib-db-manager:${TAG}"

echo -e "\nPushing Katib UI image...\n"
docker push ${REGISTRY}/katib-ui:${TAG}
docker push "${REGISTRY}/katib-ui:${TAG}"

echo -e "\nPushing Katib cert generator image...\n"
docker push ${REGISTRY}/cert-generator:${TAG}
docker push "${REGISTRY}/cert-generator:${TAG}"

echo -e "\nPushing file metrics collector image...\n"
docker push ${REGISTRY}/file-metrics-collector:${TAG}
docker push "${REGISTRY}/file-metrics-collector:${TAG}"

echo -e "\nPushing TF Event metrics collector image...\n"
docker push ${REGISTRY}/tfevent-metrics-collector:${TAG}
docker push "${REGISTRY}/tfevent-metrics-collector:${TAG}"

# Suggestion images
echo -e "\nPushing suggestion images..."

echo -e "\nPushing hyperopt suggestion...\n"
docker push ${REGISTRY}/suggestion-hyperopt:${TAG}
docker push "${REGISTRY}/suggestion-hyperopt:${TAG}"

echo -e "\nPushing chocolate suggestion...\n"
docker push ${REGISTRY}/suggestion-chocolate:${TAG}
docker push "${REGISTRY}/suggestion-chocolate:${TAG}"

echo -e "\nPushing hyperband suggestion...\n"
docker push ${REGISTRY}/suggestion-hyperband:${TAG}
docker push "${REGISTRY}/suggestion-hyperband:${TAG}"

echo -e "\nPushing skopt suggestion...\n"
docker push ${REGISTRY}/suggestion-skopt:${TAG}
docker push "${REGISTRY}/suggestion-skopt:${TAG}"

echo -e "\nPushing goptuna suggestion...\n"
docker push ${REGISTRY}/suggestion-goptuna:${TAG}
docker push "${REGISTRY}/suggestion-goptuna:${TAG}"

echo -e "\nPushing optuna suggestion...\n"
docker push ${REGISTRY}/suggestion-optuna:${TAG}
docker push "${REGISTRY}/suggestion-optuna:${TAG}"

echo -e "\nPushing ENAS suggestion...\n"
docker push ${REGISTRY}/suggestion-enas:${TAG}
docker push "${REGISTRY}/suggestion-enas:${TAG}"

echo -e "\nPushing DARTS suggestion...\n"
docker push ${REGISTRY}/suggestion-darts:${TAG}
docker push "${REGISTRY}/suggestion-darts:${TAG}"

# Early stopping images
echo -e "\nPushing early stopping images...\n"

echo -e "\nPushing median stopping rule...\n"
docker push ${REGISTRY}/earlystopping-medianstop:${TAG}
docker push "${REGISTRY}/earlystopping-medianstop:${TAG}"

# Training container images
echo -e "\nPushing training container images..."

echo -e "\nPushing mxnet mnist training container example...\n"
docker push ${REGISTRY}/mxnet-mnist:${TAG}
docker push "${REGISTRY}/mxnet-mnist:${TAG}"

echo -e "\nPushing Tensorflow with summaries mnist training container example...\n"
docker push "${REGISTRY}/tf-mnist-with-summaries:${TAG}"

echo -e "\nPushing PyTorch mnist training container example...\n"
docker push ${REGISTRY}/pytorch-mnist:${TAG}
docker push "${REGISTRY}/pytorch-mnist:${TAG}"

echo -e "\nPushing Keras CIFAR-10 CNN training container example for ENAS with GPU support...\n"
docker push ${REGISTRY}/enas-cnn-cifar10-gpu:${TAG}
docker push "${REGISTRY}/enas-cnn-cifar10-gpu:${TAG}"

echo -e "\nPushing Keras CIFAR-10 CNN training container example for ENAS with CPU support...\n"
docker push ${REGISTRY}/enas-cnn-cifar10-cpu:${TAG}
docker push "${REGISTRY}/enas-cnn-cifar10-cpu:${TAG}"

echo -e "\nPushing PyTorch CIFAR-10 CNN training container example for DARTS...\n"
docker push ${REGISTRY}/darts-cnn-cifar10:${TAG}
docker push "${REGISTRY}/darts-cnn-cifar10:${TAG}"

echo -e "\nAll Katib images with ${TAG} tag have been pushed successfully!\n"
3 changes: 3 additions & 0 deletions scripts/v1beta1/update-trial-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,20 @@ PYTORCH_MNIST="pytorch-mnist"
ENAS_GPU="enas-cnn-cifar10-gpu"
ENAS_CPU="enas-cnn-cifar10-cpu"
DARTS="darts-cnn-cifar10"
TF_MNIST_WITH_SUMMARIES="tf-mnist-with-summaries"

# MXNet mnist.
# For MacOS we should set -i '' to avoid temp files from sed.
if [[ $(uname) == "Darwin" ]]; then
find ./ -regex ".*\.yaml" -exec sed -i '' -e "s@${BASE_IMAGE_PREFIX}${MXNET_MNIST}:.*@${IMAGE_PREFIX}${MXNET_MNIST}:${TAG}@" {} \;
find ./ -regex ".*\.yaml" -exec sed -i '' -e "s@${BASE_IMAGE_PREFIX}${TF_MNIST_WITH_SUMMARIES}:.*@${IMAGE_PREFIX}${TF_MNIST_WITH_SUMMARIES}:${TAG}@" {} \;
find ./ -regex ".*\.yaml" -exec sed -i '' -e "s@${BASE_IMAGE_PREFIX}${PYTORCH_MNIST}:.*@${IMAGE_PREFIX}${PYTORCH_MNIST}:${TAG}@" {} \;
find ./ -regex ".*\.yaml" -exec sed -i '' -e "s@${BASE_IMAGE_PREFIX}${ENAS_GPU}:.*@${IMAGE_PREFIX}${ENAS_GPU}:${TAG}@" {} \;
find ./ -regex ".*\.yaml" -exec sed -i '' -e "s@${BASE_IMAGE_PREFIX}${ENAS_CPU}:.*@${IMAGE_PREFIX}${ENAS_CPU}:${TAG}@" {} \;
find ./ -regex ".*\.yaml" -exec sed -i '' -e "s@${BASE_IMAGE_PREFIX}${DARTS}:.*@${IMAGE_PREFIX}${DARTS}:${TAG}@" {} \;
else
find ./ -regex ".*\.yaml" -exec sed -i -e "s@${BASE_IMAGE_PREFIX}${MXNET_MNIST}:.*@${IMAGE_PREFIX}${MXNET_MNIST}:${TAG}@" {} \;
find ./ -regex ".*\.yaml" -exec sed -i -e "s@${BASE_IMAGE_PREFIX}${TF_MNIST_WITH_SUMMARIES}:.*@${IMAGE_PREFIX}${TF_MNIST_WITH_SUMMARIES}:${TAG}@" {} \;
find ./ -regex ".*\.yaml" -exec sed -i -e "s@${BASE_IMAGE_PREFIX}${PYTORCH_MNIST}:.*@${IMAGE_PREFIX}${PYTORCH_MNIST}:${TAG}@" {} \;
find ./ -regex ".*\.yaml" -exec sed -i -e "s@${BASE_IMAGE_PREFIX}${ENAS_GPU}:.*@${IMAGE_PREFIX}${ENAS_GPU}:${TAG}@" {} \;
find ./ -regex ".*\.yaml" -exec sed -i -e "s@${BASE_IMAGE_PREFIX}${ENAS_CPU}:.*@${IMAGE_PREFIX}${ENAS_CPU}:${TAG}@" {} \;
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/v1beta1/argo_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"katib-ui": "cmd/new-ui/v1beta1/Dockerfile",
"cert-generator": "cmd/cert-generator/v1beta1/Dockerfile",
"file-metrics-collector": "cmd/metricscollector/v1beta1/file-metricscollector/Dockerfile",
"tfevent-metrics-collector": "/cmd/metricscollector/v1beta1/tfevent-metricscollector/Dockerfile",
"tfevent-metrics-collector": "cmd/metricscollector/v1beta1/tfevent-metricscollector/Dockerfile",
"suggestion-hyperopt": "cmd/suggestion/hyperopt/v1beta1/Dockerfile",
"suggestion-chocolate": "cmd/suggestion/chocolate/v1beta1/Dockerfile",
"suggestion-skopt": "cmd/suggestion/skopt/v1beta1/Dockerfile",
Expand Down

0 comments on commit 3561aac

Please sign in to comment.