Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gaoning777 committed Nov 13, 2018
1 parent c038e44 commit 18a1d91
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions sdk/python/kfp/compiler/_component_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ def download_gcs_blob(local_path, gcs_path):

class DockerfileHelper(object):
""" Dockerfile Helper generates a tarball with dockerfile, ready for docker build
arc_dockerfile_name: dockerfile filename that is stored in the tarball
gcs_path: the gcs path to store the tarball that contains both the dockerfile and the python file """
arc_dockerfile_name: dockerfile filename that is stored in the tarball """

def __init__(self, arc_dockerfile_name):
self._arc_dockerfile_name = arc_dockerfile_name
Expand Down Expand Up @@ -249,7 +248,7 @@ def build_image_from_func(self, component_func, namespace, base_image, timeout):
local_tarball_file = os.path.join(local_build_dir, 'docker.tmp.tar.gz')
docker_helper.prepare_docker_tarball_with_py(python_filepath=local_python_filepath,
arc_python_filename=self._arc_python_filepath,
base_image=base_image, local_tarball_file=local_tarball_file)
base_image=base_image, local_tarball_path=local_tarball_file)
GCSHelper.upload_gcs_file(local_tarball_file, self._gcs_path)

kaniko_spec = self._generate_kaniko_spec(namespace=namespace,
Expand All @@ -271,7 +270,7 @@ def build_image_from_dockerfile(self, dockerfile_path, timeout, namespace):
logging.info('Generate build files.')
docker_helper = DockerfileHelper(arc_dockerfile_name=self._arc_dockerfile_name)
local_tarball_file = os.path.join(local_build_dir, 'docker.tmp.tar.gz')
docker_helper.prepare_docker_tarball(dockerfile_path, local_tarball_file=local_tarball_file)
docker_helper.prepare_docker_tarball(dockerfile_path, local_tarball_path=local_tarball_file)
GCSHelper.upload_gcs_file(local_tarball_file, self._gcs_path)

kaniko_spec = self._generate_kaniko_spec(namespace=namespace, arc_dockerfile_name=self._arc_dockerfile_name,
Expand Down

0 comments on commit 18a1d91

Please sign in to comment.