Skip to content

Commit c17827e

Browse files
committed
cpu and gpu
1 parent 32be36f commit c17827e

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

docker/Dockerfile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,14 @@ RUN pip install --no-cache-dir \
3232
COPY ./requirements.txt /tmp/
3333
RUN pip install --no-cache-dir -r /tmp/requirements.txt
3434

35-
# Enable Jupyter widget support
36-
RUN pip install --no-cache-dir ipywidgets
35+
# Install widget support
36+
RUN pip install --no-cache-dir \
37+
ipywidgets \
38+
jupyterlab_widgets
3739

38-
# For JupyterLab (inside the container), install the widget manager
39-
RUN jupyter labextension install @jupyter-widgets/jupyterlab-manager \
40-
--no-build && \
41-
jupyter lab build
40+
# Classic Notebook support (optional)
41+
RUN jupyter nbextension install --py widgetsnbextension --sys-prefix && \
42+
jupyter nbextension enable --py widgetsnbextension --sys-prefix
4243

4344
EXPOSE 8888
4445
CMD ["start-notebook.sh"]

docker/Dockerfile.gpu

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,15 @@ RUN pip install --no-cache-dir \
2727
COPY ./requirements.txt /tmp/
2828
RUN pip install --no-cache-dir -r /tmp/requirements.txt
2929

30-
# Enable Jupyter widget support
31-
RUN pip install --no-cache-dir ipywidgets
30+
# Install widget support
31+
RUN pip install --no-cache-dir \
32+
ipywidgets \
33+
jupyterlab_widgets
34+
35+
# Classic Notebook support (optional)
36+
RUN jupyter nbextension install --py widgetsnbextension --sys-prefix && \
37+
jupyter nbextension enable --py widgetsnbextension --sys-prefix
3238

33-
# For JupyterLab (inside the container), install the widget manager
34-
RUN jupyter labextension install @jupyter-widgets/jupyterlab-manager \
35-
--no-build && \
36-
jupyter lab build
3739

3840
EXPOSE 8888
3941
CMD ["start-notebook.sh"]

0 commit comments

Comments
 (0)