File tree 2 files changed +17
-5
lines changed
2 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -167,10 +167,16 @@ Resources:
167
167
# !/bin/bash
168
168
set -e
169
169
170
- # Install extension for ipywidgets interactivity:
170
+ # Install extension for interactive canvas drawing:
171
+ # ipywidgets is already present on al2-v2 NBIs. Pin versions to avoid reinstallations
171
172
sudo -u ec2-user -i <<'EOF'
172
173
source /home/ec2-user/anaconda3/bin/activate JupyterSystemEnv
173
- jupyter labextension install @jupyter-widgets/jupyterlab-manager ipycanvas
174
+ JUPYTERSERVER_VER=`pip show jupyter-server | grep 'Version:' | sed 's/Version : //'`
175
+ IPYWIDGETS_VER=`pip show ipywidgets | grep 'Version:' | sed 's/Version : //'`
176
+ pip install \
177
+ jupyter-server==$JUPYTERSERVER_VER \
178
+ ipywidgets==$IPYWIDGETS_VER \
179
+ ipycanvas
174
180
source /home/ec2-user/anaconda3/bin/deactivate
175
181
EOF
176
182
Original file line number Diff line number Diff line change @@ -30,17 +30,23 @@ Resources:
30
30
# !/bin/bash
31
31
set -e
32
32
33
- # Install extension for ipywidgets interactivity:
33
+ # Install extension for interactive canvas drawing:
34
+ # ipywidgets is already present on al2-v2 NBIs. Pin versions to avoid reinstallations
34
35
sudo -u ec2-user -i <<'EOF'
35
36
source /home/ec2-user/anaconda3/bin/activate JupyterSystemEnv
36
- jupyter labextension install @jupyter-widgets/jupyterlab-manager ipycanvas
37
+ JUPYTERSERVER_VER=`pip show jupyter-server | grep 'Version:' | sed 's/Version : //'`
38
+ IPYWIDGETS_VER=`pip show ipywidgets | grep 'Version:' | sed 's/Version : //'`
39
+ pip install \
40
+ jupyter-server==$JUPYTERSERVER_VER \
41
+ ipywidgets==$IPYWIDGETS_VER \
42
+ ipycanvas
37
43
source /home/ec2-user/anaconda3/bin/deactivate
38
44
EOF
39
45
40
46
NotebookInstance :
41
47
Type : ' AWS::SageMaker::NotebookInstance'
42
48
Properties :
43
- InstanceType : ml.t2 .medium
49
+ InstanceType : ml.t3 .medium
44
50
LifecycleConfigName : !GetAtt NotebookConfig.NotebookInstanceLifecycleConfigName
45
51
# Otherwise it gets some garbage name by default:
46
52
NotebookInstanceName : !Sub '${AWS::StackName}-Notebook'
You can’t perform that action at this time.
0 commit comments