RStudio 版本控制 - Amazon SageMaker AI
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

RStudio 版本控制

重要

允许 Amazon SageMaker Studio 或 Amazon SageMaker Studio Classic 创建 Amazon SageMaker 资源的自定义 IAM 策略还必须授予向这些资源添加标签的权限。之所以需要为资源添加标签的权限,是因为 Studio 和 Studio Classic 会自动为创建的任何资源添加标签。如果 IAM 策略允许 Studio 和 Studio Classic 创建资源,但不允许标记,则在尝试创建资源时会出现“AccessDenied”错误。有关更多信息,请参阅提供标记 SageMaker AI 资源的权限

Amazon SageMaker AI 的 Amazon 托管式策略 授予创建 SageMaker 资源的权限,其中已包含在创建这些资源时添加标签的权限。

本指南提供有关 RStudio on SageMaker AI 的 2024.04.2+764.pro1 版本更新的信息。从 2024 年 9 月 4 日起,将使用 Posit Workbench 版本 2024.04.2+764.pro1 创建支持 RStudio 的新域。这适用于 RStudioServerPro 应用程序和默认的 RSessionGateway 应用程序。

以下几节将介绍有关 2024.04.2+764.pro1 版本的信息。

最新版本更新

最新的 RStudio 版本是 2024.04.2+764.pro1。此版本包含以下更改:

  • 支持的 R 版本:

    • 4.4.0

    • 4.3.3

    • 4.2.3

    • 4.2.1

    • 4.1.3

    • 4.0.2

有关此版本中更改的更多信息,请参阅https://docs.posit.co/ide/news/

注意

为确保兼容性,我们建议使用前缀与当前 Posit Workbench 版本一致的 RSessions。

如果您看到以下警告,则说明 SageMaker AI 中 RStudio 使用的 RSession 和 Posit Workbench 版本不匹配。要解决此问题,请更新域的 RStudio 版本。有关更新 RStudio 版本的信息,请参阅 升级到新版本

Session version 2023.03.3-547.pro5 does not match server version 2024.04.2+764.pro1 - this is an unsupported configuration, and you may experience unexpected issues as a result.

版本控制

SageMaker AI 目前支持两个版本的 Posit Workbench。

  • 支持的最新版本:2024.04.2+764.pro1

  • 支持的先前版本:2023.03.3-547.pro5

注意

SageMaker AI 将支持 2023.03.3-547.pro5 版本至 2024 年 10 月。

2022.02.2-485.pro2 版本已过时,不再受支持。我们建议更新到最新版本。

SageMaker AI 选择的默认 Posit Workbench 版本取决于域的创建日期。

  • 对于 2024 年 9 月 4 日之后创建的域,默认选择版本为 2024.04.2+764.pro1

  • 对于 2024 年 2 月 27 日之后和 2024 年 9 月 4 日之前创建的域,默认选择 2023.03.3-547.pro5 版本。您可以通过将最新版本 (2024.04.2+764.pro1) 设置为域的默认版本,将域更新到此最新版本。有关更多信息,请参阅升级到新版本

  • 对于 2024 年 2 月 27 日之前创建的域,默认选择版本为 2023.03.3-547.pro5。您可以通过将最新版本 (2024.04.2+764.pro1) 设置为域的默认版本,将域更新到此最新版本。有关更多信息,请参阅升级到新版本

注意

默认 RSessionGateway 应用程序版本与 RStudioServerPro 应用程序的当前版本相匹配。

下表列出了各个 Amazon Web Services 区域的两个版本的映像 ARN。这些 ARN 将作为 update-domain 命令的一部分传递,用于设置所需版本。

Region 2023.03.3-547.pro5 映像 ARN 2024.04.2+764.pro1 映像 ARN
us-east-1 arn:aws:sagemaker:us-east-1:081325390199:image/rstudio-workbench-2023.03 arn:aws:sagemaker:us-east-1:081325390199:image/rstudio-workbench-2024.04
us-east-2 arn:aws:sagemaker:us-east-2:429704687514:image/rstudio-workbench-2023.03 arn:aws:sagemaker:us-east-2:429704687514:image/rstudio-workbench-2024.04
us-west-1 arn:aws:sagemaker:us-west-1:742091327244:image/rstudio-workbench-2023.03 arn:aws:sagemaker:us-west-1:742091327244:image/rstudio-workbench-2024.04
us-west-2 arn:aws:sagemaker:us-west-2:236514542706:image/rstudio-workbench-2023.03 arn:aws:sagemaker:us-west-2:236514542706:image/rstudio-workbench-2024.04
af-south-1 arn:aws:sagemaker:af-south-1:559312083959:image/rstudio-workbench-2023.03 arn:aws:sagemaker:af-south-1:559312083959:image/rstudio-workbench-2024.04
ap-east-1 arn:aws:sagemaker:ap-east-1:493642496378:image/rstudio-workbench-2023.03 arn:aws:sagemaker:ap-east-1:493642496378:image/rstudio-workbench-2024.04
ap-south-1 arn:aws:sagemaker:ap-south-1:394103062818:image/rstudio-workbench-2023.03 arn:aws:sagemaker:ap-south-1:394103062818:image/rstudio-workbench-2024.04
ap-northeast-2 arn:aws:sagemaker:ap-northeast-2:806072073708:image/rstudio-workbench-2023.03 arn:aws:sagemaker:ap-northeast-2:806072073708:image/rstudio-workbench-2024.04
ap-southeast-1 arn:aws:sagemaker:ap-southeast-1:492261229750:image/rstudio-workbench-2023.03 arn:aws:sagemaker:ap-southeast-1:492261229750:image/rstudio-workbench-2024.04
ap-southeast-2 arn:aws:sagemaker:ap-southeast-2:452832661640:image/rstudio-workbench-2023.03 arn:aws:sagemaker:ap-southeast-2:452832661640:image/rstudio-workbench-2024.04
ap-northeast-1 arn:aws:sagemaker:ap-northeast-1:102112518831:image/rstudio-workbench-2023.03 arn:aws:sagemaker:ap-northeast-1:102112518831:image/rstudio-workbench-2024.04
ca-central-1 arn:aws:sagemaker:ca-central-1:310906938811:image/rstudio-workbench-2023.03 arn:aws:sagemaker:ca-central-1:310906938811:image/rstudio-workbench-2024.04
eu-central-1 arn:aws:sagemaker:eu-central-1:936697816551:image/rstudio-workbench-2023.03 arn:aws:sagemaker:eu-central-1:936697816551:image/rstudio-workbench-2024.04
eu-west-1 arn:aws:sagemaker:eu-west-1:470317259841:image/rstudio-workbench-2023.03 arn:aws:sagemaker:eu-west-1:470317259841:image/rstudio-workbench-2024.04
eu-west-2 arn:aws:sagemaker:eu-west-2:712779665605:image/rstudio-workbench-2023.03 arn:aws:sagemaker:eu-west-2:712779665605:image/rstudio-workbench-2024.04
eu-west-3 arn:aws:sagemaker:eu-west-3:615547856133:image/rstudio-workbench-2023.03 arn:aws:sagemaker:eu-west-3:615547856133:image/rstudio-workbench-2024.04
eu-north-1 arn:aws:sagemaker:eu-north-1:243637512696:image/rstudio-workbench-2023.03 arn:aws:sagemaker:eu-north-1:243637512696:image/rstudio-workbench-2024.04
eu-south-1 arn:aws:sagemaker:eu-south-1:592751261982:image/rstudio-workbench-2023.03 arn:aws:sagemaker:eu-south-1:592751261982:image/rstudio-workbench-2024.04
sa-east-1 arn:aws:sagemaker:sa-east-1:782484402741:image/rstudio-workbench-2023.03 arn:aws:sagemaker:sa-east-1:782484402741:image/rstudio-workbench-2024.04

对 BYOI 映像的更改

如果您在 RStudio 中使用 BYOI 映像,并将 RStudioServerPro 版本更新为 2024.04.2+764.pro1,则必须升级自定义映像,才能使用 2024.04.2+764.pro1 版本并重新部署现有的 RSession。如果在使用 2024.04.2+764.pro1 版本的域的 RSession 中,您尝试加载不兼容的映像,则 RSession 会失败,因为它无法解析收到的参数。为防止失败,请更新现有 RStudioServerPro 应用程序中所有已部署的自定义映像。

Dockerfile 中的 RSW_VERSION 必须与 RStudio on SageMaker AI 中使用的 Posit Workbench 版本一致。您可以在 Posit Workbench 中验证当前版本。为此,请使用位于 Posit Workbench 启动器页面左下角的版本名称。

ARG RSW_VERSION=2024.04.2+764.pro1 ENV RSTUDIO_FORCE_NON_ZERO_EXIT_CODE="1" ARG RSW_NAME=rstudio-workbench ARG OS_CODE_NAME=jammy ARG RSW_DOWNLOAD_URL=https://s3.amazonaws.com/rstudio-ide-build/server/${OS_CODE_NAME}/amd64 RUN RSW_VERSION_URL=`echo -n "${RSW_VERSION}" | sed 's/+/-/g'` \ && curl -o rstudio-workbench.deb ${RSW_DOWNLOAD_URL}/${RSW_NAME}-${RSW_VERSION_URL}-amd64.deb \ && gdebi -n ./rstudio-workbench.deb