Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add notebook-server-jupyter-tensorflow-full dockerfiles and CI/CD #5632

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM public.ecr.aws/j1r0q0g6/notebooks/notebook-servers/jupyter-tensorflow:master-d609b9e1

# install - requirements.txt
COPY --chown=jovyan:users requirements.txt /tmp/requirements.txt
RUN python3 -m pip install -r /tmp/requirements.txt --quiet --no-cache-dir \
&& rm -f /tmp/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM public.ecr.aws/j1r0q0g6/notebooks/notebook-servers/jupyter-tensorflow-cuda:master-d609b9e1

# install - requirements.txt
COPY --chown=jovyan:users requirements.txt /tmp/requirements.txt
RUN python3 -m pip install -r /tmp/requirements.txt --quiet --no-cache-dir \
&& rm -f /tmp/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
kfp==1.0.4
kfp-server-api==1.0.4
kfserving==0.4.1
ipywidgets==7.6.3
ipympl==0.6.3
cloudpickle==1.6.0
dill==0.3.3
bokeh==2.3.0
seaborn==0.11.1
scipy==1.6.1
scikit-learn==0.24.1
scikit-image==0.18.1
pandas==1.2.3
matplotlib==3.3.4
xgboost==1.3.3
keras==2.4.3
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
""""Argo Workflow for building notebook-server-tensorflow-full OCI images using Kaniko"""
from kubeflow.kubeflow.cd import config, kaniko_builder


def create_workflow(name=None, namespace=None, bucket=None, **kwargs):
"""
Args:
name: Name to give to the workflow. This can also be used to name
things associated with the workflow.
"""
builder = kaniko_builder.Builder(name=name, namespace=namespace, bucket=bucket, **kwargs)

return builder.build(dockerfile="components/example-notebook-servers/jupyter-tensorflow-full/cpu.Dockerfile",
context="components/example-notebook-servers/jupyter-tensorflow-full/",
destination=config.NOTEBOOK_SERVER_JUPYTER_TENSORFLOW_FULL,
second_dockerfile="components/example-notebook-servers/jupyter-tensorflow-full/cuda.Dockerfile",
second_destination=config.NOTEBOOK_SERVER_JUPYTER_TENSORFLOW_CUDA_FULL,
mem_override="8Gi",
deadline_override=6000)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This file is only intended for development purposes
from kubeflow.kubeflow.cd import base_runner

base_runner.main(component_name="notebook_servers.notebook_server_jupyter_tensorflow_full",
workflow_name="nb-j-tf-f-build")
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
""""Argo Workflow for testing notebook-server-jupyter-tensorflow-full OCI images"""
from kubeflow.kubeflow.ci import workflow_utils
from kubeflow.testing import argo_build_util


class Builder(workflow_utils.ArgoTestBuilder):
def __init__(self, name=None, namespace=None, bucket=None,
test_target_name=None, **kwargs):
super().__init__(name=name, namespace=namespace, bucket=bucket,
test_target_name=test_target_name, **kwargs)

def build(self):
"""Build the Argo workflow graph"""
workflow = self.build_init_workflow(exit_dag=False)
task_template = self.build_task_template(mem_override="8Gi", deadline_override=6000)

# Test building notebook-server-jupyter-tensorflow-full images using Kaniko
dockerfile = ("%s/components/example-notebook-servers"
"/jupyter-tensorflow-full/cpu.Dockerfile") % self.src_dir
context = "dir://%s/components/example-notebook-servers/jupyter-tensorflow-full/" % self.src_dir
destination = "notebook-server-jupyter-tensorflow-full-cpu-test"

kaniko_task = self.create_kaniko_task(task_template, dockerfile,
context, destination, no_push=True)
argo_build_util.add_task_to_dag(workflow,
workflow_utils.E2E_DAG_NAME,
kaniko_task, [self.mkdir_task_name])

dockerfile_cuda = ("%s/components/example-notebook-servers"
"/jupyter-tensorflow-full/cuda.Dockerfile") % self.src_dir
destination_cuda = "notebook-server-jupyter-tensorflow-cuda-full-test"

kaniko_task_cuda = self.create_kaniko_task(task_template, dockerfile_cuda,
context, destination_cuda, no_push=True)
argo_build_util.add_task_to_dag(workflow,
workflow_utils.E2E_DAG_NAME,
kaniko_task_cuda, [self.mkdir_task_name])

# Set the labels on all templates
workflow = argo_build_util.set_task_template_labels(workflow)

return workflow


def create_workflow(name=None, namespace=None, bucket=None, **kwargs):
"""
Args:
name: Name to give to the workflow. This can also be used to name
things associated with the workflow.
"""
builder = Builder(name=name, namespace=namespace, bucket=bucket, **kwargs)

return builder.build()
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This file is only intended for development purposes
from kubeflow.kubeflow.ci import base_runner

base_runner.main(component_name="notebook_servers.notebook_server_jupyter_tensorflow_full_tests",
workflow_name="nb-j-tf-f-tests")