Run Commands

Docker Installation Guide

Learn how to install and use the JupyterLab Mount Extension using a Docker image.

Install to Existing Docker Image #

You can choose between Pachyderm’s pre-built image (a custom version of jupyter/scipy-notebook) or add the extension to your own image. Pachyderm’s image includes:

  • The extension jupyterlab-pachyderm
  • FUSE
  • A pre-created /pfs directory that mounts to and grants ownership to the JupyterLab User
  • A mount-server binary

Option 1: Pre-Built Image #

  1. Open your terminal.
  2. Run the following:
docker run -it -p 8888:8888 -e GRANT_SUDO=yes --user root --device /dev/fuse --privileged --entrypoint /opt/conda/bin/jupyter pachyderm/notebooks-user:v2.6.10  lab --allow-root
  1. Open the UI using the link provided in the terminal following:
[I 2023-01-26 19:07:00.245 ServerApp] Jupyter Server 1.16.0 is running at:
[I 2023-01-26 19:07:00.245 ServerApp] http://fb66b212ca13:8888/lab?token=013dbb47fc32c0f1ec8277a399e8ccf0e4eb87055942a21d
[I 2023-01-26 19:07:00.245 ServerApp]  or http://127.0.0.1:8888/lab?token=013dbb47fc32c0f1ec8277a399e8ccf0e4eb87055942a21d
  1. Navigate to the connection tab. You will need to provide a link formatted like the following:
http://localhost:80

mount connection url

  1. Navigate to the Launcher view in Jupyter and select Terminal.
  2. Input the following command:
pachctl version
  1. If you see a pachctl and pachd version, you are good to go.

Option 2: Custom Dockerfile #

Replace the following ${PACHCTL_VERSION} with the version of pachctl that matches your cluster’s, and update <version> with the release number of the extension.

You can find the latest available version of our Pachyderm Mount Extension in PyPi.

# This runs the following section as root; if adding to an existing Dockerfile, set the user back to whatever you need. 
USER root

# This is the directory files will be mounted to, mirroring how pipelines are run. 
RUN mkdir -p /pfs 

# If you are not using "jovyan" as your notebook user, replace the user here. 
RUN chown $NB_USER /pfs

# Fuse is a requirement for the mount extension 
RUN apt-get clean && RUN apt-get update && apt-get -y install curl fuse 

# Install the mount-server binary
RUN curl -f -o mount-server.deb -L https://github.com/pachyderm/pachyderm/releases/download/v${PACHCTL_VERSION}/mount-server_${PACHCTL_VERSION}_amd64.deb
RUN dpkg -i mount-server.deb

# Optionally Install Pachctl - Set the version of Pachctl that matches your cluster deployment. 
RUN curl -f -o pachctl.deb -L https://github.com/pachyderm/pachyderm/releases/download/v${PACHCTL_VERSION}/pachctl_${PACHCTL_VERSION}_amd64.deb 
RUN dpkg -i pachctl.deb

# This sets the user back to the notebook user account (i.e., Jovyan) 
USER $NB_UID

# Replace the version here with the version of the extension you would like to install from https://pypi.org/project/jupyterlab-pachyderm/ 
RUN pip install jupyterlab-pachyderm==<version> 

Then, build, tag, and push your image.