tensorflow / tensorflow/tensorboard

Running tensorboard inside a notebook in a jupyterhub container.

Open
#4,662 7 comments 0 reactions 1 assignee View on GitHub

@ericdnielsen is already working on this.

Since Apr 21, 2021.

core:backend stat:awaiting tensorflower type:support
Dominant language
TypeScript
Stars
7.2k
Forks
1.7k
Avg merge
4d 22h
Merged PRs (30d)
1

Description

My setup:

  • jupyterhub running inside a Docker container (port 8000). Tensorboard is installed inside the container
  • on the remote server, a server apache2 redirects 8000 from the container to 443.
  • client connect to jupyterhub (at port 443).

I am aware that my setup is non standard and hence there exists multiple possible points of failure.

Environment information (required)

Diagnostics
Diagnostics output
--- check: autoidentify
INFO: diagnose_tensorboard.py version e43767ef2b648d0d5d57c00f38ccbd38390e38da

--- check: general
INFO: sys.version_info: sys.version_info(major=3, minor=8, micro=2, releaselevel='final', serial=0)
INFO: os.name: posix
INFO: os.uname(): posix.uname_result(sysname='Linux', nodename='6a66a1233b01', release='4.15.0-135-generic', version='#139-Ubuntu SMP Mon Jan 18 17:38:24 UTC 2021', machine='x86_64')
INFO: sys.getwindowsversion(): N/A

--- check: package_management
INFO: has conda-meta: False
INFO: $VIRTUAL_ENV: None

--- check: installed_packages
INFO: installed: tensorboard==2.4.1
WARNING: no installation among: ['tensorflow', 'tensorflow-gpu', 'tf-nightly', 'tf-nightly-2.0-preview', 'tf-nightly-gpu', 'tf-nightly-gpu-2.0-preview']
WARNING: no installation among: ['tensorflow-estimator', 'tensorflow-estimator-2.0-preview', 'tf-estimator-nightly']

--- check: tensorboard_python_version
INFO: tensorboard.version.VERSION: '2.4.1'

--- check: tensorflow_python_version
Traceback (most recent call last):
  File "diagnose_tensorboard.py", line 522, in main
    suggestions.extend(check())
  File "diagnose_tensorboard.py", line 75, in wrapper
    result = fn()
  File "diagnose_tensorboard.py", line 278, in tensorflow_python_version
    import tensorflow as tf
ModuleNotFoundError: No module named 'tensorflow'

--- check: tensorboard_data_server_version
INFO: no data server installed

--- check: tensorboard_binary_path
INFO: which tensorboard: b'/home/etienne/.local/bin/tensorboard\n'

--- check: addrinfos
socket.has_ipv6 = True
socket.AF_UNSPEC = <AddressFamily.AF_UNSPEC: 0>
socket.SOCK_STREAM = <SocketKind.SOCK_STREAM: 1>
socket.AI_ADDRCONFIG = <AddressInfo.AI_ADDRCONFIG: 32>
socket.AI_PASSIVE = <AddressInfo.AI_PASSIVE: 1>
Loopback flags: <AddressInfo.AI_ADDRCONFIG: 32>
Loopback infos: [(<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('127.0.0.1', 0))]
Wildcard flags: <AddressInfo.AI_PASSIVE: 1>
Wildcard infos: [(<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('0.0.0.0', 0)), (<AddressFamily.AF_INET6: 10>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('::', 0, 0, 0))]

--- check: readable_fqdn
INFO: socket.getfqdn(): '6a66a1233b01'

--- check: stat_tensorboardinfo
INFO: directory: /tmp/.tensorboard-info
INFO: os.stat(...): os.stat_result(st_mode=16895, st_ino=1826157, st_dev=50, st_nlink=2, st_uid=1000, st_gid=1000, st_size=4096, st_atime=1612781434, st_mtime=1612781434, st_ctime=1612781434)
INFO: mode: 0o40777

--- check: source_trees_without_genfiles
INFO: tensorboard_roots (1): ['/home/etienne/.local/lib/python3.8/site-packages']; bad_roots (0): []

--- check: full_pip_freeze
INFO: pip freeze --all:
absl-py==0.11.0
affine==2.3.0
alembic @ file:///tmp/wheelhouse/alembic-1.4.3-py2.py3-none-any.whl
anyio==2.0.2
appdirs==1.4.4
argon2-cffi==20.1.0
arrow==0.17.0
async-generator @ file:///tmp/wheelhouse/async_generator-1.10-py3-none-any.whl
attrs @ file:///tmp/wheelhouse/attrs-20.2.0-py2.py3-none-any.whl
Babel==2.9.0
backcall==0.2.0
backports.csv==1.0.7
beautifulsoup4==4.9.3
binaryornot==0.4.4
bleach==3.2.3
blis==0.7.4
cachetools==4.2.1
catalogue==1.0.0
certifi @ file:///tmp/wheelhouse/certifi-2020.6.20-py2.py3-none-any.whl
certipy @ file:///tmp/wheelhouse/certipy-0.1.3-py3-none-any.whl
cffi @ file:///tmp/wheelhouse/cffi-1.14.3-cp38-cp38-manylinux1_x86_64.whl
chardet @ file:///tmp/wheelhouse/chardet-3.0.4-py2.py3-none-any.whl
cheroot==8.5.1
CherryPy==18.6.0
click==7.1.2
click-plugins==1.1.1
cligj==0.7.1
confuse==1.4.0
contextily==1.0.1
cookiecutter==1.7.2
cryptography @ file:///tmp/wheelhouse/cryptography-3.2.1-cp35-abi3-manylinux2010_x86_64.whl
cycler==0.10.0
cymem==2.0.5
DBnomics==1.2.0
dbus-python==1.2.16
decorator==4.4.2
defusedxml==0.6.0
descartes==1.1.0
distlib==0.3.1
distro==1.4.0
entrypoints @ file:///tmp/wheelhouse/entrypoints-0.3-py2.py3-none-any.whl
eurostat==0.2.1
feedparser==6.0.2
filelock==3.0.12
Fiona==1.8.18
fr-core-news-md @ https://github.com/explosion/spacy-models/releases/download/fr_core_news_md-2.3.0/fr_core_news_md-2.3.0.tar.gz
future==0.18.2
gensim==3.8.3
geographiclib==1.50
geopandas==0.8.1
geopy==2.0.0
google-auth==1.25.0
google-auth-oauthlib==0.4.2
google-trans-new==1.1.9
grpcio==1.35.0
htmlmin==0.1.12
idna @ file:///tmp/wheelhouse/idna-2.10-py2.py3-none-any.whl
ImageHash==4.2.0
imageio==2.9.0
imageio-ffmpeg==0.4.2
instagram-scraper==1.9.1
ipykernel==5.4.3
ipython==7.19.0
ipython-genutils @ file:///tmp/wheelhouse/ipython_genutils-0.2.0-py2.py3-none-any.whl
ipywidgets==7.6.3
jaraco.classes==3.1.0
jaraco.collections==3.1.0
jaraco.functools==3.1.0
jaraco.text==3.4.0
jedi==0.18.0
Jinja2 @ file:///tmp/wheelhouse/Jinja2-2.11.2-py2.py3-none-any.whl
jinja2-time==0.2.0
joblib==0.17.0
json5==0.9.5
jsonpath-rw==1.4.0
jsonschema @ file:///tmp/wheelhouse/jsonschema-3.2.0-py2.py3-none-any.whl
jupyter-client==6.1.11
jupyter-core==4.7.0
jupyter-server==1.2.2
jupyter-telemetry @ file:///tmp/wheelhouse/jupyter_telemetry-0.1.0-py3-none-any.whl
jupyterhub @ file:///tmp/wheelhouse/jupyterhub-1.2.1-py3-none-any.whl
jupyterlab==3.0.5
jupyterlab-pygments==0.1.2
jupyterlab-server==2.1.3
jupyterlab-widgets==1.0.0
kaggle==1.5.10
kiwisolver==1.3.1
llvmlite==0.35.0
lxml==4.6.1
Mako @ file:///tmp/wheelhouse/Mako-1.1.3-py2.py3-none-any.whl
mapclassify==2.4.2
Markdown==3.3.3
MarkupSafe @ file:///tmp/wheelhouse/MarkupSafe-1.1.1-cp38-cp38-manylinux1_x86_64.whl
matplotlib==3.3.3
mercantile==1.1.6
missingno==0.4.2
mistune==0.8.4
more-itertools==8.6.0
moviepy==1.0.3
munch==2.5.0
murmurhash==1.0.5
mysqlclient==2.0.3
nbclassic==0.2.6
nbclient==0.5.1
nbconvert==6.0.7
nbformat==5.1.2
nbresuse==0.4.0
nest-asyncio==1.5.1
networkx==2.5
nltk==3.5
notebook==6.2.0
numba==0.52.0
numpy==1.19.4
oauthlib @ file:///tmp/wheelhouse/oauthlib-3.1.0-py2.py3-none-any.whl
packaging==20.8
pamela @ file:///tmp/wheelhouse/pamela-1.0.0-py2.py3-none-any.whl
pandas==1.1.4
pandas-profiling==2.10.0
pandaSDMX==0.9
pandocfilters==1.4.3
parso==0.8.1
patsy==0.5.1
Pattern==3.6
pdfminer.six==20201018
pexpect==4.8.0
phik==0.11.0
pickleshare==0.7.5
Pillow==8.0.1
pip==20.3.3
plac==1.1.3
ply==3.11
portend==2.7.0
poyo==0.5.0
preshed==3.0.5
proglog==0.1.9
prometheus-client @ file:///tmp/wheelhouse/prometheus_client-0.8.0-py2.py3-none-any.whl
prompt-toolkit==3.0.14
protobuf==3.14.0
ptyprocess==0.7.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycparser @ file:///tmp/wheelhouse/pycparser-2.20-py2.py3-none-any.whl
pycurl==7.43.0.2
Pygments==2.7.4
PyGObject==3.36.0
pyOpenSSL @ file:///tmp/wheelhouse/pyOpenSSL-19.1.0-py2.py3-none-any.whl
pyparsing==2.4.7
pyproj==3.0.0.post1
pyrsistent @ file:///tmp/wheelhouse/pyrsistent-0.17.3-cp38-cp38-linux_x86_64.whl
pyshp==2.1.2
python-dateutil @ file:///tmp/wheelhouse/python_dateutil-2.8.1-py2.py3-none-any.whl
python-docx==0.8.10
python-editor @ file:///tmp/wheelhouse/python_editor-1.0.4-py3-none-any.whl
python-json-logger @ file:///tmp/wheelhouse/python_json_logger-2.0.1-py34-none-any.whl
python-slugify==4.0.1
pytz==2020.4
PyWavelets==1.1.1
PyYAML==5.3.1
pyzmq==22.0.0
rasterio==1.1.8
regex==2020.11.13
requests @ file:///tmp/wheelhouse/requests-2.24.0-py2.py3-none-any.whl
requests-oauthlib==1.3.0
rsa==4.7
ruamel.yaml @ file:///tmp/wheelhouse/ruamel.yaml-0.16.12-py2.py3-none-any.whl
ruamel.yaml.clib @ file:///tmp/wheelhouse/ruamel.yaml.clib-0.2.2-cp38-cp38-manylinux1_x86_64.whl
scikit-learn==0.23.2
scipy==1.5.4
seaborn==0.11.1
Send2Trash==1.5.0
setuptools @ file:///tmp/wheelhouse/setuptools-50.3.2-py3-none-any.whl
sgmllib3k==1.0.0
Shapely==1.7.1
six @ file:///tmp/wheelhouse/six-1.15.0-py2.py3-none-any.whl
smart-open==4.0.1
sniffio==1.2.0
snuggs==1.4.7
sortedcontainers==2.3.0
soupsieve==2.1
spacy==2.3.5
SQLAlchemy @ file:///tmp/wheelhouse/SQLAlchemy-1.3.20-cp38-cp38-manylinux2010_x86_64.whl
srsly==1.0.5
ssh-import-id==5.10
statsmodels==0.12.1
tangled-up-in-unicode==0.0.6
tempora==4.0.1
tensorboard==2.4.1
tensorboard-plugin-wit==1.8.0
terminado==0.9.2
testpath==0.4.4
text-unidecode==1.3
textblob==0.15.3
thinc==7.4.5
threadpoolctl==2.1.0
torch==1.7.1+cpu
torchaudio==0.7.2
torchsummary==1.5.1
torchtext==0.8.1
torchvision==0.8.2+cpu
tornado==6.1
tqdm==4.52.0
traitlets @ file:///tmp/wheelhouse/traitlets-5.0.5-py3-none-any.whl
tweet-preprocessor==0.6.0
typing-extensions==3.7.4.3
urllib3 @ file:///tmp/wheelhouse/urllib3-1.25.11-py2.py3-none-any.whl
virtualenv==20.2.2
visions==0.6.0
vowpalwabbit==8.9.0
wasabi==0.8.0
wcwidth==0.2.5
webencodings==0.5.1
Werkzeug==1.0.1
wheel==0.34.2
widgetsnbextension==3.5.1
wordcloud==1.8.1
xlrd==1.2.0
zc.lockfile==2.0

Issue description

I want to tensorboard to run inside jupyter notebook.

I am running the following code inside the NB :

os.environ["TENSORBOARD_BINARY"] = "/home/etienne/.local/bin/tensorboard"

%load_ext tensorboard

%tensorboard --logdir=runs

Error

The web page at https://DOMAIN_NAME:6006/ may be temporarily inaccessible or may have been moved permanently to a different web address.

Additional informations
  • The webrowser used is chrome (version 87.0.4280.141 ; official build)
  • From a terminal inside the container, I can successfully curl tensorboard :
etienne@6a66a1233b01:~/ecb$ curl localhost:6006 | head -4
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0<!doctype html><meta name="tb-relative-root" content="./"><!doctype html><!--
@license
Copyright 2019 The TensorFlow Authors. All Rights Reserved.

100  102k  100  102k    0     0  50.0M      0 --:--:-- --:--:-- --:--:-- 50.0M
curl: (23) Failed writing body (4096 != 16384)
  • In the browser dev tools, the error is the following (I blurred the domain name) :
    image

  • I also try the following commands without success : %tensorboard --logdir=runs --bind_all, %tensorboard --logdir=runs --host localhost, %tensorboard --logdir=runs --host 0.0.0.0.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.