diff --git a/.azdo/build-jupterserver.yml b/.azdo/build-jupterserver.yml new file mode 100644 index 0000000..23e76d9 --- /dev/null +++ b/.azdo/build-jupterserver.yml @@ -0,0 +1,21 @@ +# Pipeline to build and push Jupyter server image. + + +pool: + vmImage: "ubuntu-latest" + +variables: + - group: kubeflow-azdo-sample + +jobs: + - job: + steps: + - task: Docker@2 + displayName: Build and Push Jupyter Server Image + inputs: + containerRegistry: 'kubeflow-azdo-sample-acr-sc' + repository: 'experimentation/jupyterserver' + command: 'buildAndPush' + Dockerfile: 'setup/jupyter/Dockerfile' + buildContext: 'setup/jupyter/' + tags: 'latest' diff --git a/code/pipelineazdo.py b/code/pipelineazdo.py index 6a2cc7c..deb3aa1 100644 --- a/code/pipelineazdo.py +++ b/code/pipelineazdo.py @@ -234,10 +234,9 @@ def tacosandburritos_train( op_1.container.set_image_pull_policy("Always") op_1.add_volume( k8s_client.V1Volume( - name='azure', - persistent_volume_claim=k8s_client.V1PersistentVolumeClaimVolumeSource( # noqa: E501 - claim_name='azure-managed-file') - ) + name='azure', + persistent_volume_claim=k8s_client.V1PersistentVolumeClaimVolumeSource(claim_name='azure-managed-file') # noqa: E501 + ) ).add_volume_mount(k8s_client.V1VolumeMount( mount_path='/mnt/azure', name='azure')) diff --git a/setup/jupyter/Dockerfile b/setup/jupyter/Dockerfile new file mode 100644 index 0000000..5cca137 --- /dev/null +++ b/setup/jupyter/Dockerfile @@ -0,0 +1,18 @@ +FROM gcr.io/kubeflow-images-public/tensorflow-2.1.0-notebook-cpu:1.0.0 +USER root +RUN pip install pandas +RUN pip install seaborn +RUN pip install scikit-learn +# Install Kale python package globally +RUN pip install kubeflow-kale +# Install Kale JupyterLab extension +RUN jupyter labextension install kubeflow-kale-launcher + +RUN echo "jovyan ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/jovyan +WORKDIR /home/jovyan +USER jovyan + +ENV NB_PREFIX / +CMD ["sh","-c", "jupyter lab --notebook-dir=/home/jovyan --ip=0.0.0.0 --no-browser --allow-root --port=8888 --NotebookApp.token='' --NotebookApp.password='' --NotebookApp.allow_origin='*' --NotebookApp.base_url=${NB_PREFIX}"] + +