mirror of
https://github.com/hanzo-ml/katib.git
synced 2026-09-24 00:31:27 +00:00
reduce build time (#84)
* reduce build time Signed-off-by: YujiOshima <[email protected]> * parallel build Signed-off-by: YujiOshima <[email protected]> * fix Signed-off-by: YujiOshima <[email protected]>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
.git
|
||||
.gitignore
|
||||
docs
|
||||
examples
|
||||
manifests
|
||||
+7
-7
@@ -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
|
||||
|
||||
+39
-17
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user