aws-samples / amazon-sagemaker-codeserver

Hosting code-server on Amazon SageMaker
MIT No Attribution
48 stars 17 forks source link

codeserver on sagemaker studio #10

Open cassie101 opened 1 year ago

cassie101 commented 1 year ago

Hi, codeserver seems to be running bare bone, similar to a system terminal. Is there anywhere we could run codeserver that uses computing resource with gpu such as pytorch-1-8-gpu-py3-ml-g4dn-xlarge?

wdwatkins commented 1 year ago

Seconding this, if the codeserver console could run on the same choices of Docker images + EC2 instances as Jupyter notebooks that would be 🚀

babegeman commented 1 year ago

Since this is running inside the VPC, you'd think that maybe a Jupyter remote connection would work? It would almost have to be this outside of a custom extension written for VSCode for launching Sagemaker notebook instances and automatically opening them (which would also be awesome).

I think the other thing in this same track is allowing the script to install newer versions of Code-Server that supports newer extensions in general. Having Copilot would be pretty awesome for one.

Riezebos commented 1 year ago

@babegeman you can install a newer version of code-server by changing this line: https://github.com/aws-samples/amazon-sagemaker-codeserver/blob/main/install-scripts/studio/install-codeserver.sh#L11

Unfortunately, this won't help to install Copilot, for reasons explained here: https://coder.com/docs/code-server/latest/FAQ#why-cant-code-server-use-microsofts-extension-marketplace

There are workarounds for this but they are discouraged for legal reasons: https://coder.com/docs/code-server/latest/FAQ#how-do-i-use-my-own-extensions-marketplace

EDIT: Here is an alternative to Copilot that works in non-Microsoft versions of VSCode: https://open-vsx.org/extension/Codeium/codeium

babegeman commented 1 year ago

@babegeman you can install a newer version of code-server by changing this line: https://github.com/aws-samples/amazon-sagemaker-codeserver/blob/main/install-scripts/studio/install-codeserver.sh#L11

Unfortunately, this won't help to install Copilot, for reasons explained here: https://coder.com/docs/code-server/latest/FAQ#why-cant-code-server-use-microsofts-extension-marketplace

There are workarounds for this but they are discouraged for legal reasons: https://coder.com/docs/code-server/latest/FAQ#how-do-i-use-my-own-extensions-marketplace

EDIT: Here is an alternative to Copilot that works in non-Microsoft versions of VSCode: https://open-vsx.org/extension/Codeium/codeium

This is extremely helpful. Thank you. I think the last killer feature for this application would be to support connecting to Jupyter notebook instances spun up from Sagemaker Studio, then you can run your Python on some beefier hardware than the barebones Sagemaker Studio one. That would make it downright essential.

Riezebos commented 1 year ago

Looks like it's possible to set up an SSH connection from your local machine to the notebook environment: https://github.com/aws-samples/sagemaker-ssh-helper#local-ide-integration-with-sagemaker-studio-over-ssh-for-pycharm--vscode

I guess this should also be possible from the System terminal in code-server, although I haven't tried setting this up.

hwaxxer commented 1 year ago

I thought the whole purpose of code-server was to be able to run on any SageMaker instance. Does this not work? I really don't understand what the purpose of code-server integration with SageMaker is if selecting instances is not possible. Why would I just want a worse browser based version of VSCode? What am I missing?

Edit: not meaning to sound rude, just curious since this seems like a core use-case. I setup code-server yesterday for notebooks but it would be a 10x better integration if code-server in Studio allowed instance-selection.

kshre commented 1 year ago

I thought the whole purpose of code-server was to be able to run on any SageMaker instance. Does this not work? I really don't understand what the purpose of code-server integration with SageMaker is if selecting instances is not possible. Why would I just want a worse browser based version of VSCode? What am I missing?

Edit: not meaning to sound rude, just curious since this seems like a core use-case. I setup code-server yesterday for notebooks but it would be a 10x better integration if code-server in Studio allowed instance-selection.

The code-server does not have remote machine access capabilities built in like VSCode server does. You are right the whole point of hosting this code-server should be to be able to for instance do line by line debugging on a powerful instance which runs the code.

The studio use-case in it's current form is pretty useless since the code server runs on a tiny machine on which the jupyter server is hosted

@giuseppeporcelli is connecting the jupyter kernel instances possible to the code server, if not could this be supported by Sagemaker Studio team as an additional capability in code-server?

DrJeckyl commented 1 year ago

This is also an important feature for my teams. We are running in VPC only and the default notebook IDE is not great. Being able to run the VSCode server to connect to the kernel gateway apps is my number 1 feature request.

Oblynx commented 9 months ago

This is an essential feature. Without this, we simply cannot work with Studio.