Skip to content

Commit 1ad688e

Browse files
twalcaripre-commit-ci[bot]mathbunnyru
authored
Improve handling of tensorboard (#2126)
* Improve handling of tensorboard * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Improve style * Move bash file to cuda-subdir * Update tensorflow-notebook info * Fix redirect link --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Ayaz Salikhov <[email protected]>
1 parent 7f6f16c commit 1ad688e

File tree

4 files changed

+22
-3
lines changed

4 files changed

+22
-3
lines changed

docs/using/selecting.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@ It contains:
193193
`jupyter/tensorflow-notebook` includes popular Python deep learning libraries.
194194

195195
- Everything in `jupyter/scipy-notebook` and its ancestor images
196-
- [tensorflow](https://www.tensorflow.org/) machine learning library
196+
- [TensorFlow](https://www.tensorflow.org/) machine learning library
197+
- [Jupyter Server Proxy](https://jupyter-server-proxy.readthedocs.io/en/latest/) to support [TensorBoard](https://www.tensorflow.org/tensorboard)
197198

198199
### jupyter/pytorch-notebook
199200

images/tensorflow-notebook/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
1313

1414
# Install tensorflow with pip, on x86_64 tensorflow-cpu
1515
RUN [[ $(uname -m) = x86_64 ]] && TF_POSTFIX="-cpu" || TF_POSTFIX="" && \
16-
pip install --no-cache-dir "tensorflow${TF_POSTFIX}" && \
16+
pip install --no-cache-dir \
17+
"tensorflow${TF_POSTFIX}" \
18+
"jupyter-server-proxy" && \
1719
fix-permissions "${CONDA_DIR}" && \
1820
fix-permissions "/home/${NB_USER}"
21+
22+
COPY --chown="${NB_UID}:${NB_GID}" cuda/20tensorboard-proxy-env.sh /usr/local/bin/before-notebook.d/
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
# Copyright (c) Jupyter Development Team.
3+
# Distributed under the terms of the Modified BSD License.
4+
5+
set -e
6+
7+
# Initialize the TENSORBOARD_PROXY_URL with the appropriate path
8+
# to use jupyter-server-proxy.
9+
10+
export TENSORBOARD_PROXY_URL="${JUPYTERHUB_SERVICE_PREFIX:-/}proxy/%PORT%/"

images/tensorflow-notebook/cuda/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,14 @@ LABEL maintainer="Jupyter Project <[email protected]>"
1212
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
1313

1414
# Install TensorFlow, CUDA and cuDNN with pip
15-
RUN pip install --no-cache-dir "tensorflow[and-cuda]" && \
15+
RUN pip install --no-cache-dir \
16+
"tensorflow[and-cuda]" \
17+
"jupyter-server-proxy" && \
1618
fix-permissions "${CONDA_DIR}" && \
1719
fix-permissions "/home/${NB_USER}"
1820

21+
COPY --chown="${NB_UID}:${NB_GID}" 20tensorboard-proxy-env.sh /usr/local/bin/before-notebook.d/
22+
1923
# workaround for https://github.com/tensorflow/tensorflow/issues/63362
2024
RUN mkdir -p "${CONDA_DIR}/etc/conda/activate.d/" && \
2125
fix-permissions "${CONDA_DIR}"

0 commit comments

Comments
 (0)