Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reduce build time #84

Merged
merged 3 commits into from
May 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gcloudignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.git
.gitignore
docs
examples
manifests
14 changes: 7 additions & 7 deletions modeldb/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
56 changes: 39 additions & 17 deletions test/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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