Last active
October 28, 2024 08:06
-
-
Save sofianhamiti/0bce9c2ba6aaf05f6ff0fb26f46e31a8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# /home/ec2-user/anaconda3/envs/JupyterSystemEnv/bin/pip install -U keytar jupyter-server-proxy | |
echo == INSTALLING CODE-SERVER == | |
curl -fsSL https://code-server.dev/install.sh | sh -s -- --version=4.12.0 | |
######################################### | |
### INTEGRATE CODE-SERVER WITH JUPYTER | |
######################################### | |
echo == UPDATING THE JUPYTER SERVER CONFIG == | |
cat >>/home/ec2-user/.jupyter/jupyter_notebook_config.py <<EOC | |
c.ServerProxy.servers = { | |
'vscode': { | |
'launcher_entry': { | |
'enabled': True, | |
'title': 'VS Code', | |
}, | |
'command': ['code-server', '--auth', 'none', '--disable-telemetry', '--bind-addr', '0.0.0.0:{port}'], | |
'environment' : {'XDG_DATA_HOME' : '/home/ec2-user/SageMaker/vscode-config'}, | |
'absolute_url': False, | |
'timeout': 30 | |
} | |
} | |
EOC | |
echo == INSTALL SUCCESSFUL. RESTARTING JUPYTER == | |
# RESTART THE JUPYTER SERVER | |
systemctl restart jupyter-server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@scotteggs OMG, after hours of struggling, your comment saved me. Much thanks!!!