Skip to content
This repository has been archived by the owner on Aug 17, 2023. It is now read-only.

Commit

Permalink
Allow user specify existing image (#501)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinchihe authored Jun 9, 2020
1 parent a934c76 commit 804916b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion kubeflow/fairing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

name = "fairing"

__version__ = "0.7.2"
__version__ = "0.7.3"
6 changes: 4 additions & 2 deletions kubeflow/fairing/builders/base_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ def __init__(self,
self.image_tag = None
self.docker_client = None

def generate_pod_spec(self):
def generate_pod_spec(self, image=None):
if not image:
image = self.image_tag
return client.V1PodSpec(
containers=[client.V1Container(
name='model',
image=self.image_tag,
image=image,
command=self.preprocessor.get_command(),
security_context=client.V1SecurityContext(
run_as_user=0,
Expand Down
2 changes: 1 addition & 1 deletion kubeflow/fairing/builders/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def build(self):
raise NotImplementedError('BuilderInterface.build')

@abc.abstractmethod
def generate_pod_spec(self):
def generate_pod_spec(self, image=None):
"""This method should return a V1PodSpec with the correct image set.
This is also where the builder should set the environment variables
and volume/volumeMounts that it may need to work
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name='kubeflow-fairing',
version='0.7.2',
version='0.7.3',
author="Kubeflow Authors",
author_email='hejinchi@cn.ibm.com',
license="Apache License Version 2.0",
Expand Down

0 comments on commit 804916b

Please sign in to comment.