Skip to content

Commit ac73e40

Browse files
committed
cpu and gpu
1 parent fc55edd commit ac73e40

File tree

2 files changed

+16
-24
lines changed

2 files changed

+16
-24
lines changed

docker/Dockerfile

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,14 @@ RUN pip install --no-cache-dir \
3333
COPY ./requirements.txt /tmp/
3434
RUN pip install --no-cache-dir -r /tmp/requirements.txt
3535

36-
# Install all widget bits via pip
37-
RUN pip install --no-cache-dir \
38-
ipywidgets \
39-
jupyterlab_widgets \
40-
widgetsnbextension
41-
42-
# Enable classic-notebook widget nbextension
43-
RUN jupyter nbextension install --py widgetsnbextension --sys-prefix && \
44-
jupyter nbextension enable --py widgetsnbextension --sys-prefix
45-
46-
# Enable the server extension for JupyterLab & VS Code
47-
RUN jupyter server extension enable --py jupyterlab_widgets --sys-prefix
36+
# Enable Jupyter widget support
37+
RUN pip install --no-cache-dir ipywidgets
38+
39+
# For JupyterLab (inside the container), install the widget manager
40+
RUN jupyter labextension install @jupyter-widgets/jupyterlab-manager \
41+
--no-build && \
42+
jupyter lab build && \
43+
jupyter labextension enable @jupyter-widgets/jupyterlab-manager
4844

4945
EXPOSE 8888
5046
CMD ["start-notebook.sh"]

docker/Dockerfile.gpu

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,14 @@ RUN pip install --no-cache-dir \
2929
COPY ./requirements.txt /tmp/
3030
RUN pip install --no-cache-dir -r /tmp/requirements.txt
3131

32-
# Install all widget bits via pip
33-
RUN pip install --no-cache-dir \
34-
ipywidgets \
35-
jupyterlab_widgets \
36-
widgetsnbextension
37-
38-
# Enable classic-notebook widget nbextension
39-
RUN jupyter nbextension install --py widgetsnbextension --sys-prefix && \
40-
jupyter nbextension enable --py widgetsnbextension --sys-prefix
41-
42-
# Enable the server extension for JupyterLab & VS Code
43-
RUN jupyter server extension enable --py jupyterlab_widgets --sys-prefix
32+
# Enable Jupyter widget support
33+
RUN pip install --no-cache-dir ipywidgets
34+
35+
# For JupyterLab (inside the container), install the widget manager
36+
RUN jupyter labextension install @jupyter-widgets/jupyterlab-manager \
37+
--no-build && \
38+
jupyter lab build && \
39+
jupyter labextension enable @jupyter-widgets/jupyterlab-manager
4440

4541
EXPOSE 8888
4642
CMD ["start-notebook.sh"]

0 commit comments

Comments
 (0)