Skip to content
Ryan Loney edited this page Feb 28, 2023 · 11 revisions

To run notebooks inside a Linux-based Docker container, please use the Dockerfile by following the steps below.

Step 0: Clone the Notebooks Repo

git clone https://github.com/openvinotoolkit/openvino_notebooks.git
cd openvino_notebooks

Step 1: Build the Docker Image

docker build -t openvino_notebooks .

Step 2: Run the Docker Image

Command for CPU-only:

docker run -it -p 8888:8888 openvino_notebooks

NOTE: If you plan to run model training notebooks, allocate additional memory by running docker run -it -p 8888:8888 --shm-size 8G openvino_notebooks

Command for CPU and GPU (requires system with integrated or discrete Intel GPU):

docker run -it --device=/dev/dri --group-add=$(stat -c "%g" /dev/dri/render* | head -n 1) -p 8888:8888 openvino_notebooks

Step 3: Open Browser

Copy the URL printed in the terminal and open in a browser. If it is a remote machine, replace 127.0.0.1 with the correct IP address. Jupyter_URL

The Dockerfile can be used to run a local image on Windows, Linux or macOS. It is also compatible with Open Data Hub and Red Hat OpenShift Data Science. The base layer is a UBI 8-based image provided by Project Thoth.

NOTE: When running the container on Windows and macOS, only CPU devices can be used. To access the iGPU, please install the notebooks locally following the instructions on the main README