Skip to content

Commit fc55edd

Browse files
committed
cpu and gpu
1 parent be57813 commit fc55edd

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

docker/Dockerfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,18 @@ 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 widget support
36+
# Install all widget bits via pip
3737
RUN pip install --no-cache-dir \
3838
ipywidgets \
39-
jupyterlab_widgets
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
4048

4149
EXPOSE 8888
4250
CMD ["start-notebook.sh"]

docker/Dockerfile.gpu

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,18 @@ 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 widget support
32+
# Install all widget bits via pip
3333
RUN pip install --no-cache-dir \
3434
ipywidgets \
35-
jupyterlab_widgets
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
3644

3745
EXPOSE 8888
3846
CMD ["start-notebook.sh"]

0 commit comments

Comments
 (0)