github.com/pachyderm/pachyderm@v1.13.4/doc/docs/1.10.x/how-tos/use-jupyterhub/index.md (about) 1 # Use JupyterHub with `python-pachyderm` 2 3 !!! note 4 JupyterHub integration with Pachyderm is an 5 enterprise feature. Contact sales@pachyderm.com 6 to request enabling JupyterHub integration 7 for your Pachyderm Enterprise license. 8 9 This section describes how you can use the `python-pachyderm` 10 client from within the JupyterHub UI. 11 12 !!! note 13 You need to have Pachyderm and JupyterHub installed on the 14 same Kubernetes cluster as described in 15 [Deploy Pachyderm with JupyterHub](../../deploy-manage/deploy/deploy-pachyderm-jupyterhub.md). 16 17 ## Overview 18 19 JupyterHub is a popular data science platform that enables users 20 to quickly spin out multiple single-tenant Jupyter Notebook server instances. 21 Jupyter Notebook provides a Python interactive development environment (IDE) 22 that is convenient for data science projects. Because of the built-in 23 rich-text support, visualizations, the easy-to-use web interface, many 24 enterprise users prefer Jupyter Notebooks to the classic Terminal prompt. 25 JupyterHub brings all the benefits of Jupyter Notebooks without the need 26 to install or configure anything on user machines except for a web browser. 27 28 [python-pachyderm](https://github.com/pachyderm/python-pachyderm) is an 29 official Python client for Pachyderm. For Python developers who prefer to 30 communicate with Pachyderm directly through the API, rather than by using 31 the `pachctl` tool, `python-pachyderm` is the right choice. 32 The [API Documentation](https://pachyderm.github.io/python-pachyderm/python_pachyderm.m.html) 33 describes various API operations that you can execute to interact with 34 Pachyderm. 35 36 When you deployed JupyterHub by using our deployment script, `python-pachyderm` 37 was installed in JupyterHub so that you can run API requests directly from 38 your Jupyter Notebook. 39 40 ### Difference in Pipeline Creation Methods 41 42 43 `python-pachyderm` supports the standard 44 [create_pipeline](https://pachyderm.github.io/python-pachyderm/python_pachyderm.m.html#python_pachyderm.Client.create_pipeline) 45 method that is 46 also available through the Pachyderm CLI and UI. When you use 47 `create_pipeline`, you need to build a new Docker image and push 48 it to an image registry every 49 time you update the code in your pipeline. Users that are less familiar 50 with Docker might find this process a bit cumbersome. However, you must 51 use this method for all non-Python code. 52 53 When you use `python-pachyderm`, in addition to the 54 `create_pipeline` method, 55 you can use the [create_python_pipeline](https://pachyderm.github.io/python-pachyderm/python_pachyderm.m.html#python_pachyderm.create_python_pipeline) 56 function that does not require 57 you to include your code in a Docker image and rebuild it each time you make 58 a change. Instead, this function creates a PFS repository 59 called `<pipeline_name>_source` and puts the source code into it. Also, it 60 creates a `<pipeline_name>_build` repository to build Python dependencies. 61 Therefore, when you use `create_python_pipeline`, your DAG includes two 62 additional repositories for each pipeline. 63 Because of that, you do not need 64 to build a new Docker image every time you change something in your 65 pipeline code. You can run your code instantly. This method is ideal for 66 users who want to avoid building Docker images. 67 68 While you can mix and match pipeline creation methods in JupyterHub, you might 69 eventually want to pick one method that works for your use case. It is a 70 matter of personal preference which method to use. While some users might 71 find it convenient to avoid the Docker build workflow, others might want to 72 enable Docker in JupyterHub or build Docker images from their local machines. 73 74 In the [OpenCV Example for JupyterHub](https://github.com/pachyderm/jupyterhub-pachyderm), 75 both methods are used in the same notebook cell.