Skip to content

Commit f08bc4a

Browse files
foobrichet
authored andcommitted
Install nodejs=16 in docker, and pin nbclassic under 0.4.0
1 parent eb1c19a commit f08bc4a

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

demos/Dockerfile

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,24 @@
66

77
FROM ubuntu:22.04
88
ENV DEBIAN_FRONTEND=noninteractive
9+
ENV NODE_VERSION=16.17.1
10+
911
RUN apt-get update \
1012
&& apt-get -y dist-upgrade \
11-
&& apt-get -y install git sudo
13+
&& apt-get -y install git sudo curl
14+
1215
# cache some of the bigger installs
13-
RUN apt-get -y install python3-pip nodejs npm
14-
RUN python3 -m pip install --upgrade jupyterhub notebook nbclassic
16+
RUN apt-get -y install python3-pip npm
17+
RUN python3 -m pip install --upgrade jupyterhub
18+
19+
# Install nodejs v16 (not available yet on apt).
20+
ENV NVM_DIR=/root/.nvm
21+
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
22+
RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}
23+
RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION}
24+
RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION}
25+
ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"
26+
1527
RUN git clone https://github.com/jupyter/nbgrader /srv/nbgrader/nbgrader
1628
# COPY is like deploy_demos.sh
1729
COPY ./ /root/

demos/restart_demo.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ install_dependencies () {
2626
apt install -y npm
2727
npm install -g configurable-http-proxy
2828
apt install -y python3-pip
29+
pip3 install -U nbclassic==0.3.7
2930
pip3 install -U jupyterlab
3031
pip3 install -U jupyterhub
3132
}

0 commit comments

Comments
 (0)