NVIDIA
NVIDIA
BERT for TensorFlow Jupyter Notebook
Resource
NVIDIA
NVIDIA
BERT for TensorFlow Jupyter Notebook

Jupyter Notebook example for Question Answering with BERT for TensorFlow

Deploy the notebook

Prerequisites

  1. Nvidia Driver
  2. Docker CE
  3. Nvidia-Docker
  4. BERT Demo Jupyter Notebook (BERT_Demo.ipynb) - downloaded from this page.

Setup

Start The environment

Given that Docker and Nvidia-Docker are setup correctly on the demo server, launching this demo notebook should be as simple as running this command:

docker run --runtime=nvidia -it --net=host -v $(pwd):/workspace \
	--name NGC-BERT-Demo-Notebook \
	nvcr.io/nvidia/tensorflow:19.07-py3 \
	jupyter notebook --ip=0.0.0.0 --allow-root --NotebookApp.token=''

This will start the Jupyter Notebook at http://: where is the IP of the server running this docker command, and will default to 8888. You should expect to see a page like below:

note - while this command will pull the 19-07-py3 version of the TensorFlow container - it may work with later versions, but the notebook is untested.

Execute the notebook

  1. This will start the Jupyter Notebook at http://<IP>:<PORT> where <IP> is the IP of the server running this docker command, and <PORT> will default to 8888.
  2. Now you can just click on the BERT_Demo.ipynb to open the Notebook, and just start running through the cells using either the “Run” button at the top, or by pressing <Shift>+<Enter> when a given cell is highlighted.

Authentication

You can require a password in order to login to the demo notebook by replacing --NotebookApp.token='' with --NotebookApp.token='<password>' you'll then see a password screen when you navigate to the Notebook page in your browser.

NVIDIA uses cookies to improve your experience on our web site. We and our third-party partners also use cookies and other tools to collect and record information you provide as well as information about your interactions with our websites for performance improvement, analytics, and to assist in marketing efforts. By clicking "Accept All", you consent to our use of cookies and other tools as described in our Cookie Policy. You can manage your cookie settings by clicking on "Manage Settings." By continuing to use this site or by clicking one of the buttons below, you agree to our Terms of Service (which contains important waivers). Please see our Privacy Policy for more information on our privacy practices.