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

Commit 804916b

Browse files
authored
Allow user specify existing image (#501)
1 parent a934c76 commit 804916b

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

kubeflow/fairing/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88

99
name = "fairing"
1010

11-
__version__ = "0.7.2"
11+
__version__ = "0.7.3"

kubeflow/fairing/builders/base_builder.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,13 @@ def __init__(self,
3838
self.image_tag = None
3939
self.docker_client = None
4040

41-
def generate_pod_spec(self):
41+
def generate_pod_spec(self, image=None):
42+
if not image:
43+
image = self.image_tag
4244
return client.V1PodSpec(
4345
containers=[client.V1Container(
4446
name='model',
45-
image=self.image_tag,
47+
image=image,
4648
command=self.preprocessor.get_command(),
4749
security_context=client.V1SecurityContext(
4850
run_as_user=0,

kubeflow/fairing/builders/builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def build(self):
1010
raise NotImplementedError('BuilderInterface.build')
1111

1212
@abc.abstractmethod
13-
def generate_pod_spec(self):
13+
def generate_pod_spec(self, image=None):
1414
"""This method should return a V1PodSpec with the correct image set.
1515
This is also where the builder should set the environment variables
1616
and volume/volumeMounts that it may need to work

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name='kubeflow-fairing',
8-
version='0.7.2',
8+
version='0.7.3',
99
author="Kubeflow Authors",
1010
author_email='[email protected]',
1111
license="Apache License Version 2.0",

0 commit comments

Comments
 (0)