diff --git a/backend/Makefile b/backend/Makefile index 6de98b79e77b..91cda22c8b8b 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -2,7 +2,7 @@ BUILD=build MOD_ROOT=.. CSV_PATH=backend/third_party_licenses -# Whenever build command for any of the binaries change, we should update them both here and in odh_images/Dockerfiles. +# Whenever build command for any of the binaries change, we should update them both here and in backend/Dockerfiles. .PHONY: all all: license_apiserver license_persistence_agent license_cache_server license_swf license_viewer license_driver license_launcher @@ -55,19 +55,19 @@ image_all: image_apiserver image_persistence_agent image_cache image_swf image_v .PHONY: image_apiserver image_apiserver: - cd $(MOD_ROOT) && docker build -t apiserver -f odh_images/Dockerfile . + cd $(MOD_ROOT) && docker build -t apiserver -f backend/Dockerfile . .PHONY: image_persistence_agent image_persistence_agent: - cd $(MOD_ROOT) && docker build -t persistence-agent -f odh_images/Dockerfile.persistenceagent . + cd $(MOD_ROOT) && docker build -t persistence-agent -f backend/Dockerfile.persistenceagent . .PHONY: image_cache image_cache: - cd $(MOD_ROOT) && docker build -t cache-server -f odh_images/Dockerfile.cacheserver . + cd $(MOD_ROOT) && docker build -t cache-server -f backend/Dockerfile.cacheserver . .PHONY: image_swf image_swf: - cd $(MOD_ROOT) && docker build -t scheduledworkflow -f odh_images/Dockerfile.scheduledworkflow . + cd $(MOD_ROOT) && docker build -t scheduledworkflow -f backend/Dockerfile.scheduledworkflow . .PHONY: image_viewer image_viewer: - cd $(MOD_ROOT) && docker build -t viewercontroller -f odh_images/Dockerfile.viewercontroller . + cd $(MOD_ROOT) && docker build -t viewercontroller -f backend/Dockerfile.viewercontroller . .PHONY: image_visualization image_visualization: - cd $(MOD_ROOT) && docker build -t visualization -f odh_images/Dockerfile.visualization . + cd $(MOD_ROOT) && docker build -t visualization -f backend/Dockerfile.visualization . diff --git a/backend/README.md b/backend/README.md index 5cf7ab981031..853d83dd6b79 100644 --- a/backend/README.md +++ b/backend/README.md @@ -28,7 +28,7 @@ Finally, it is advised to install [pre-commit](https://pre-commit.com/) in order The API server image can be built from the root folder of the repo using: ``` export API_SERVER_IMAGE=api_server -docker build -f odh_images/Dockerfile . --tag $API_SERVER_IMAGE +docker build -f backend/Dockerfile . --tag $API_SERVER_IMAGE ``` ## Deploy APIServer with the image you own build @@ -76,5 +76,5 @@ dependencies. Run ``` -docker build . -f odh_images/Dockerfile.conformance -t +docker build . -f backend/Dockerfile.conformance -t ``` diff --git a/backend/src/cache/README.md b/backend/src/cache/README.md index 9c279303696f..4a8e0b9512b6 100644 --- a/backend/src/cache/README.md +++ b/backend/src/cache/README.md @@ -2,7 +2,7 @@ To build the Docker image of cache server, run the following Docker command from the pipelines directory: ``` -docker build -t gcr.io/ml-pipeline/cache-server:latest -f odh_images/Dockerfile.cacheserver . +docker build -t gcr.io/ml-pipeline/cache-server:latest -f backend/Dockerfile.cacheserver . ``` ## Deploy cache service to an existing KFP deployment diff --git a/developer_guide.md b/developer_guide.md index f90d3e99305d..39e72e6b10df 100644 --- a/developer_guide.md +++ b/developer_guide.md @@ -16,7 +16,7 @@ To build the API server image and upload it to GCR on x86_64 machines: ```bash # Run in the repository root directory -$ docker build -t gcr.io//api-server:latest -f odh_images/Dockerfile . +$ docker build -t gcr.io//api-server:latest -f backend/Dockerfile . # Push to GCR $ gcloud auth configure-docker $ docker push gcr.io//api-server:latest @@ -26,7 +26,7 @@ To build the API server image and upload it to GCR on non-x86_64 machines (such ```bash # Run in the repository root directory -$ docker build -t gcr.io//api-server:latest -f odh_images/Dockerfile +$ docker build -t gcr.io//api-server:latest -f backend/Dockerfile # Push to GCR $ gcloud auth configure-docker $ docker push gcr.io//api-server:latest @@ -36,7 +36,7 @@ To build the scheduled workflow controller image and upload it to GCR: ```bash # Run in the repository root directory -$ docker build -t gcr.io//scheduledworkflow:latest -f odh_images/Dockerfile.scheduledworkflow . +$ docker build -t gcr.io//scheduledworkflow:latest -f backend/Dockerfile.scheduledworkflow . # Push to GCR $ gcloud auth configure-docker $ docker push gcr.io//scheduledworkflow:latest @@ -46,7 +46,7 @@ To build the viewer CRD controller image and upload it to GCR: ```bash # Run in the repository root directory -$ docker build -t gcr.io//viewer-crd-controller:latest -f odh_images/Dockerfile.viewercontroller . +$ docker build -t gcr.io//viewer-crd-controller:latest -f backend/Dockerfile.viewercontroller . # Push to GCR $ gcloud auth configure-docker $ docker push gcr.io//viewer-crd-controller:latest @@ -56,7 +56,7 @@ To build the persistence agent image and upload it to GCR: ```bash # Run in the repository root directory -$ docker build -t gcr.io//persistenceagent:latest -f odh_images/Dockerfile.persistenceagent . +$ docker build -t gcr.io//persistenceagent:latest -f backend/Dockerfile.persistenceagent . # Push to GCR $ gcloud auth configure-docker $ docker push gcr.io//persistenceagent:latest @@ -66,7 +66,7 @@ To build the visualization server image and upload it to GCR: ```bash # Run in the repository root directory -$ docker build -t gcr.io//visualization:latest -f odh_images/Dockerfile.visualization . +$ docker build -t gcr.io//visualization:latest -f backend/Dockerfile.visualization . # Push to GCR $ gcloud auth configure-docker $ docker push gcr.io//visualization:latest @@ -89,7 +89,7 @@ Minikube can pick your local Docker image so you don't need to upload to remote For example, to build API server image ```bash -$ docker build -t ml-pipeline-api-server -f odh_images/Dockerfile . +$ docker build -t ml-pipeline-api-server -f backend/Dockerfile . ``` ## Python based visualizations diff --git a/scripts/deploy/github/build-images.sh b/scripts/deploy/github/build-images.sh index 2f80121f9e10..ffa6db2e216f 100755 --- a/scripts/deploy/github/build-images.sh +++ b/scripts/deploy/github/build-images.sh @@ -23,9 +23,9 @@ TAG="${TAG:-latest}" docker system prune -a -f -docker build -q -t "${REGISTRY}/apiserver:${TAG}" -f odh_images/Dockerfile . && docker push "${REGISTRY}/apiserver:${TAG}" & -docker build -q -t "${REGISTRY}/persistenceagent:${TAG}" -f odh_images/Dockerfile.persistenceagent . && docker push "${REGISTRY}/persistenceagent:${TAG}" & -docker build -q -t "${REGISTRY}/scheduledworkflow:${TAG}" -f odh_images/Dockerfile.scheduledworkflow . && docker push "${REGISTRY}/scheduledworkflow:${TAG}" & +docker build -q -t "${REGISTRY}/apiserver:${TAG}" -f backend/Dockerfile . && docker push "${REGISTRY}/apiserver:${TAG}" & +docker build -q -t "${REGISTRY}/persistenceagent:${TAG}" -f backend/Dockerfile.persistenceagent . && docker push "${REGISTRY}/persistenceagent:${TAG}" & +docker build -q -t "${REGISTRY}/scheduledworkflow:${TAG}" -f backend/Dockerfile.scheduledworkflow . && docker push "${REGISTRY}/scheduledworkflow:${TAG}" & wait diff --git a/test/cloudbuild/api_server.yaml b/test/cloudbuild/api_server.yaml index b3057a3c45e6..50d87928b899 100644 --- a/test/cloudbuild/api_server.yaml +++ b/test/cloudbuild/api_server.yaml @@ -1,7 +1,7 @@ steps: - id: "api-server" name: "gcr.io/cloud-builders/docker" - args: ['build', '-t', '$_GCR_BASE/api-server', '-f', 'odh_images/Dockerfile', '--build-arg', 'COMMIT_SHA=abcdefg', '--build-arg', 'TAG_NAME=1.0-dev', '.'] + args: ['build', '-t', '$_GCR_BASE/api-server', '-f', 'backend/Dockerfile', '--build-arg', 'COMMIT_SHA=abcdefg', '--build-arg', 'TAG_NAME=1.0-dev', '.'] timeout: 1800s # 30min options: machineType: N1_HIGHCPU_8 # This is cpu intensive, use a better machine.