diff --git a/.gcloudignore b/.gcloudignore new file mode 100644 index 00000000000..71db69db235 --- /dev/null +++ b/.gcloudignore @@ -0,0 +1,5 @@ +.git +.gitignore +docs +examples +manifests diff --git a/modeldb/Dockerfile b/modeldb/Dockerfile index 0ca380ead04..9a9a4ac1f64 100644 --- a/modeldb/Dockerfile +++ b/modeldb/Dockerfile @@ -1,10 +1,10 @@ -FROM thrift:0.11 AS build-env -RUN apt-get update && apt-get install -y git -RUN git clone https://github.com/mitdbg/modeldb -ADD modeldb/frontend /modeldb/frontend -WORKDIR /modeldb/frontend -RUN mkdir -p './thrift' && \ - thrift -r -out './thrift' -gen js:node '../thrift/ModelDB.thrift' +FROM mitdbg/modeldb-frontend AS build-env +ADD modeldb/frontend/app.js /modeldb/frontend/app.js +ADD modeldb/frontend/public /modeldb/frontend/public +ADD modeldb/frontend/routes /modeldb/frontend/routes +ADD modeldb/frontend/util /modeldb/frontend/util +ADD modeldb/frontend/views /modeldb/frontend/views +ADD modeldb/frontend/package.json /modeldb/frontend/package.json FROM node:alpine COPY --from=build-env /modeldb /modeldb diff --git a/test/scripts/build.sh b/test/scripts/build.sh index 3534ead5941..97672930a22 100755 --- a/test/scripts/build.sh +++ b/test/scripts/build.sh @@ -34,31 +34,53 @@ mkdir -p ${GOPATH}/src/github.com/${REPO_OWNER} ln -s ${PWD} ${GO_DIR} cd ${GO_DIR} -echo "Build operator binary" -mkdir bin -go build -o bin/katib-core github.com/kubeflow/katib/cmd/manager -go build -o bin/dlkmanager github.com/kubeflow/katib/dlk/dlkmanager -go build -o bin/katib-suggestion-grid github.com/kubeflow/katib/cmd/suggestion/grid -go build -o bin/katib-suggestion-hyperband github.com/kubeflow/katib/cmd/suggestion/hyperband -go build -o bin/katib-suggestion-random github.com/kubeflow/katib/cmd/suggestion/random -go build -o bin/katib-earlystopping-medianstopping github.com/kubeflow/katib/cmd/earlystopping/medianstopping -go build -o bin/katib github.com/kubeflow/katib/cmd/cli #echo "building container in gcloud" #gcloud version # gcloud components update -q + +pids=() cp cmd/manager/Dockerfile . -gcloud container builds submit . --tag=${REGISTRY}/${REPO_NAME}/vizier-core:${VERSION} --project=${PROJECT} +gcloud container builds submit . --tag=${REGISTRY}/${REPO_NAME}/vizier-core:${VERSION} --project=${PROJECT} & +pids+=($!) +sleep 30 # wait for copy code to gcloud + cp cmd/suggestion/random/Dockerfile . -gcloud container builds submit . --tag=${REGISTRY}/${REPO_NAME}/suggestion-random:${VERSION} --project=${PROJECT} +gcloud container builds submit . --tag=${REGISTRY}/${REPO_NAME}/suggestion-random:${VERSION} --project=${PROJECT} & +pids+=($!) +sleep 30 # wait for copy code to gcloud + cp cmd/suggestion/grid/Dockerfile . -gcloud container builds submit . --tag=${REGISTRY}/${REPO_NAME}/suggestion-grid:${VERSION} --project=${PROJECT} +gcloud container builds submit . --tag=${REGISTRY}/${REPO_NAME}/suggestion-grid:${VERSION} --project=${PROJECT} & +pids+=($!) +sleep 30 # wait for copy code to gcloud + cp cmd/suggestion/hyperband/Dockerfile . -gcloud container builds submit . --tag=${REGISTRY}/${REPO_NAME}/suggestion-hyperband:${VERSION} --project=${PROJECT} +gcloud container builds submit . --tag=${REGISTRY}/${REPO_NAME}/suggestion-hyperband:${VERSION} --project=${PROJECT} & +pids+=($!) +sleep 30 # wait for copy code to gcloud + cp cmd/suggestion/bayesianoptimization/Dockerfile . -gcloud container builds submit . --tag=${REGISTRY}/${REPO_NAME}/suggestion-bayesianoptimization:${VERSION} --project=${PROJECT} +gcloud container builds submit . --tag=${REGISTRY}/${REPO_NAME}/suggestion-bayesianoptimization:${VERSION} --project=${PROJECT} & +pids+=($!) +sleep 30 # wait for copy code to gcloud + cp cmd/earlystopping/medianstopping/Dockerfile . -gcloud container builds submit . --tag=${REGISTRY}/${REPO_NAME}/earlystopping-medianstopping:${VERSION} --project=${PROJECT} +gcloud container builds submit . --tag=${REGISTRY}/${REPO_NAME}/earlystopping-medianstopping:${VERSION} --project=${PROJECT} & +pids+=($!) +sleep 30 # wait for copy code to gcloud + cp dlk/Dockerfile . -gcloud container builds submit . --tag=${REGISTRY}/${REPO_NAME}/dlk-manager:${VERSION} --project=${PROJECT} +gcloud container builds submit . --tag=${REGISTRY}/${REPO_NAME}/dlk-manager:${VERSION} --project=${PROJECT} & +pids+=($!) +sleep 30 # wait for copy code to gcloud + cp modeldb/Dockerfile . -gcloud container builds submit . --tag=${REGISTRY}/${REPO_NAME}/katib-frontend:${VERSION} --project=${PROJECT} +gcloud container builds submit . --tag=${REGISTRY}/${REPO_NAME}/katib-frontend:${VERSION} --project=${PROJECT} & +pids+=($!) + +for pid in ${pids[@]}; do + wait $pid + if [ $? -ne 0 ]; then + exit 1 + fi +done