[GRDM-60339] RStudio Serverの最新安定版インストールとrstudio.ymlによるバージョン指定に対応#26
Draft
yacchin1205 wants to merge 1 commit into
Draft
[GRDM-60339] RStudio Serverの最新安定版インストールとrstudio.ymlによるバージョン指定に対応#26yacchin1205 wants to merge 1 commit into
yacchin1205 wants to merge 1 commit into
Conversation
0c64600 to
e39d141
Compare
Merged
e39d141 to
5a35c2d
Compare
… pinning via rstudio.yml
5a35c2d to
58a4b23
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RStudio Serverのインストールを、ハードコードされた固定バージョンの.debから「最新安定版の自動解決+リポジトリからのバージョン指定」に変更するPRです。
これまでRStudio Serverは特定バージョン(2023.12.1)の.debのURLとSHA256をハードコードしてインストールしており、更新のたびにコード修正が必要でした(#17 のような更新PRが都度必要でした)。また、RStudioはRのグラフィックエンジンバージョンごとに対応実装が必要であり、古いRStudioのままでは新しいRでPlotsペインが無効化されます(R 4.6のエンジンバージョン17にはRStudio 2025.09以降が必要)。Rの更新に追随するには、RStudioも継続的に更新できる仕組みが必要です。
本PRでは次のように変更します。
1. デフォルトは最新安定版を自動インストール
Positが公開しているメタデータ https://www.rstudio.com/wp-content/downloads.json からDockerfile生成時に最新安定版のURLとSHA256を解決します。SHA256もメタデータに含まれるため、ハッシュ検証は従来どおり維持されます。解決結果は生成されるDockerfileに定数として埋め込まれるため、Dockerレイヤーキャッシュは従来どおり機能し、新版リリース時のみ無効化されます。なお、現行のRStudioはR 3.6.0以上を要求するため、それより古いRが指定された場合は従来の2023.12.1を引き続き使用します。
2.
rstudio.ymlによるバージョン指定利用者がリポジトリに
rstudio.ymlを置くことで、RStudio Serverのバージョンを明示できます(mpm.ymlと同じ、リポジトリ内設定ファイルの形式です)。repo2dockerの再現性はリポジトリ内の設定ファイルで利用者が定義するものであるため、バージョンを固定したい利用者はこのファイルで宣言します。sha256 は任意で、指定された場合のみ検証します(Positが過去バージョンのハッシュを提供するAPIを持たないため。バージョンのみ指定した場合はHTTPSでの取得となります)。ドキュメント(config_files / howto/languages)にも記載を追加しています。
3. 新しいRStudioの起動失敗の修正
新しいRStudioの.debはインストール時(postinst)に
/var/lib/rstudio-serverへroot所有のsession-rpc-key等を作成し、非rootユーザーで動作するrserverが読めず起動に失敗するため、インストール後に${NB_USER}へchownする修正を含みます。動作確認
ローカルDocker環境にて以下を確認済みです。
rstudio.ymlなし: RStudio Server 2026.06.0+242(現時点の最新安定版)がインストールされ、Jupyter経由の /rstudio/ からIDEの起動・RコードのConsole実行・Plotsペインへの描画、およびAbout画面でのバージョン表示を確認rstudio.ymlで2024.04.2+764を指定: 指定どおりのバージョンがインストールされ、About画面で「2024.04.2 Build 764」を確認