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

Provide supported base image(s) for SageMaker #663

Open
blairj09 opened this issue Nov 9, 2023 · 4 comments
Open

Provide supported base image(s) for SageMaker #663

blairj09 opened this issue Nov 9, 2023 · 4 comments
Labels
security Related to security or vulnerability management workbench Specific to workbench images

Comments

@blairj09
Copy link
Contributor

blairj09 commented Nov 9, 2023

RStudio on SageMaker currently supplies two distinct base images that correspond to the two versions of Posit Workbench that have been used in SageMaker:
image

The challenge is that each of these images is based on Ubuntu 18 which is EOL and no longer supported by Posit products. This is of particular concern with SageMaker because it means that binary package installations from Package Manager will not be supported since we no longer build binaries for Ubuntu 18.04.

I propose we build/supply a SageMaker-specific base image(s). We won't be able to provide these as default options for SageMaker users automatically, but we could distribute our images in ECR and document how customers could enable access to them within their environments.

While SageMaker will periodically update their existing base images, I think it makes sense for us to continue to provide our own base images that stay up to date with latest OS and R changes/dependencies. This way, we can better support customers who want an up-to-date SageMaker image but don't want/have capacity to build and implement it from scratch.

There is also a security advantage of providing SageMaker specific images because we can remove components that SageMaker doesn't use (like VSCode and Jupyter). These components are responsible for occasional vulnerabilities in the session image so removing them for SageMaker would make sense.

@bdeitte bdeitte added the needs refinement Marked for review at a future meeting label Nov 9, 2023
@bschwedler
Copy link
Contributor

bschwedler commented Nov 22, 2023

@MariaSemple started these changes in #624

@costrouc
Copy link
Member

@blairj09 is going to add a follow up on this issue

@costrouc costrouc added workbench Specific to workbench images security Related to security or vulnerability management and removed needs refinement Marked for review at a future meeting labels Mar 13, 2024
@blairj09
Copy link
Contributor Author

SageMaker is re-evaluating the architecture of Posit Workbench on their platform and may decide to move forward with a new implementation that would not require session images. We should hold off on this work while SageMaker continues the investigation.

@NicolaiLolansen
Copy link

Can you shine some light on the work that is being done here?

The official AWS docs here: https://docs.aws.amazon.com/sagemaker/latest/dg/rstudio-byoi-specs.html is mentioning that you should follow this guide: https://support.rstudio.com/hc/en-us/articles/360019253393-Using-Docker-images-with-RStudio-Server-Pro-Launcher-and-Kubernetes

However I can't get these images to spin up. This is a snippet of my logs:

  | 2024-06-07T06:42:25.714Z | + sudo touch /var/log/studio/rsession-gateway.log
  | 2024-06-07T06:42:25.714Z | + echo 'REDACTED ALL=(ALL) NOPASSWD: ALL'
  | 2024-06-07T06:42:25.714Z | Starting RSessionGateway on default port
  | 2024-06-07T06:42:25.714Z | + export SAGEMAKER_RSESSION_GATEWAY_LOG_FILE=/var/log/studio/rsession-gateway.log
  | 2024-06-07T06:42:25.714Z | + SAGEMAKER_RSESSION_GATEWAY_LOG_FILE=/var/log/studio/rsession-gateway.log
  | 2024-06-07T06:42:25.714Z | + CONDA_DIR=/opt/.sagemakerinternal/conda
  | 2024-06-07T06:42:25.714Z | + '[' 0 -ge 1 ']'
  | 2024-06-07T06:42:25.714Z | + echo 'Starting RSessionGateway on default port'
  | 2024-06-07T06:42:31.069Z | + /opt/.sagemakerinternal/conda/bin/rsession-gateway
  | 2024-06-07T06:42:48.715Z | 500 POST /api/session (169.255.254.2) 2536.26ms

If this is not supported or doesn't work, it would be nice to have AWS update their documentation, or have Posit put a disclaimer that the session images will not work in Sagemaker.

@blairj09

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
security Related to security or vulnerability management workbench Specific to workbench images
Projects
None yet
Development

No branches or pull requests

5 participants