Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] - SageMaker_SSH_IDE.ipynb does not work #49

Closed
andormarkus opened this issue Jan 22, 2024 · 2 comments
Closed

[bug] - SageMaker_SSH_IDE.ipynb does not work #49

andormarkus opened this issue Jan 22, 2024 · 2 comments

Comments

@andormarkus
Copy link

andormarkus commented Jan 22, 2024

Hi Team and @ivan-khvostishkov ,

I followed the instructions of Local IDE integration with SageMaker Studio over SSH for PyCharm / VSCode.

How to reproduce

I did the following steps:

  1. Created new SageMaker domain
  2. Updated the execution roles according the Setting up your AWS account with IAM and SSM configuration guide
  3. Launched a Studio personal application
  4. Created a new Space
  5. Launched JupyterLab environment
  6. Downloaded the latest version of this repo, uploaded to the notebook and unzipped
  7. Opened SageMaker_SSH_IDE.ipynb and selected the Python 3 (ipykernel) as kernel
  8. Started the execution of the cells in the notebook
  9. The following cell execution failed
%%sh
sm-ssh-ide configure
-> mkdir: cannot create directory ‘/opt/sagemaker-ssh-helper/’: Permission denied

Steps tried to solve the issue

I tried to following steps to solve the issue:

%%sh
whoami

-> sagemaker-user
%%sh
groups sagemaker-user

-> sagemaker-user : users
%%sh
ls -s /

total 0
lrwxrwxrwx   1 root   root      7 Oct  4 02:08 bin -> usr/bin
drwxr-xr-x   2 root   root      6 Apr 18  2022 boot
drwxr-xr-x   5 root   root    340 Jan 22 07:34 dev
drwxrwxr-x   1 root   root     66 Jan 22 07:34 etc
drwxrwxrwx   1 root   root     28 Nov  9 14:12 home
lrwxrwxrwx   1 root   root      7 Oct  4 02:08 lib -> usr/lib
lrwxrwxrwx   1 root   root      9 Oct  4 02:08 lib32 -> usr/lib32
lrwxrwxrwx   1 root   root      9 Oct  4 02:08 lib64 -> usr/lib64
lrwxrwxrwx   1 root   root     10 Oct  4 02:08 libx32 -> usr/libx32
drwxr-xr-x   2 root   root      6 Oct  4 02:08 media
drwxr-xr-x   2 root   root      6 Oct  4 02:08 mnt
drwxr-xr-x   1 root   root     55 Jan 22 07:34 opt
dr-xr-xr-x 133 nobody nogroup   0 Jan 22 07:34 proc
drwx------   1 root   root     20 Nov  9 14:16 root
drwxr-xr-x   1 root   root     25 Nov  9 14:17 run
lrwxrwxrwx   1 root   root      8 Oct  4 02:08 sbin -> usr/sbin
drwxr-xr-x   2 root   root      6 Oct  4 02:08 srv
dr-xr-xr-x  13 nobody nogroup   0 Jan 22 07:34 sys
drwxrwxrwt   1 root   root     32 Jan 22 07:43 tmp
drwxrwxr-x   1 root   root     19 Nov  9 00:31 usr
drwxr-xr-x   1 root   root     17 Oct  4 02:12 var

It looks like the sagemaker-user does not have permission to write to /opt.

Let's add sagemaker-user to root group and restart the sessions and the instance as well to be sure.

I still get the the same issue.

Possible solutions

  1. The sm-ssh-ide scripts utilises alternative directory and not /opt
  2. The permission of the sagemaker-user is fixed or ACL is added to the /opt directory.

Thanks,
Andor

@ivan-khvostishkov
Copy link
Contributor

Hi, Andor, thanks for your interest in SageMaker SSH Helper! Unfortunately the newly updated SageMaker Studio experience is not working yet with SageMaker SSH Helper.

Could you please try SageMaker Studio Classic in a meantime?

If you want to add it a new use case or a feature, see CONTRIBUTING.

I'm closing this issue now in favour of #51, please continue the conversation there.

@blankenshipz
Copy link

Can we get a message in the README That alerts users this repo isn't working in the current version of Sagemaker?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants