VIM (or other Plugin) installation in SageMaker Jupyter(Lab)

Viewed 1635

Can one install Jupyter/JupyterLab plugins on SageMaker? I don't see any options to add plugins either in JupyterLab or the SageMaker interface. Would love to have at least the VIM plugin installed.

2 Answers

Thanks for using SageMaker!

Jupyter or JupyterLab extensions always needs to be installed within JupyterSystemEnv Conda environment within SageMaker Notebook Instances. We have documented as a comment in one of the scripts in Notebook Instance LifeCycle Config

You can use Jupyter /JupyterLab Terminal to install extensions though we recommend to use LifeCycle config scripts based on start Notebook Instance so that across reboots you would be able to use extensions without any hassle of installing packages by yourself on every reboot. You will find more information in the above linked documentation.

Here is how I installed jupyterlab_vim extension in JupyterLab

Open the Jupyter/JupyterLab Terminal and type following

source /home/ec2-user/anaconda3/bin/activate /home/ec2-user/anaconda3/envs/JupyterSystemEnv 

you will be logged into JupyterSystemEnv Conda environment after that type below command,

jupyter labextension install jupyterlab_vim 

Now refresh the browser, you should be able to use all vim shortcuts listed in jupyterlab-vim

Related