aws / aws/sagemaker-python-sdk

Support network_mode=host for local testing

オープン
#5,318 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
component: local mode type: feature request
主要言語
Python
スター
2.3k
フォーク
1.3k
平均マージ
1日 22時間
マージ済み PR(30日)
35

説明

**Describe the feature you'd like**
Sagemaker local uses docker compose internal network to make containers communicate with each other.
For some tools, such as Snowflake, some companies may require login via SSO when testing locally.
However the login redirect (bringing back the access token) cannot be managed by the sagemaker container since it is not listening to the same localhost (docker internal network) as the user's browser (actual localhost).

**How would this feature be used? Please describe.**
Allow setting `network_mode="host"` in [container configuration](https://github.com/aws/sagemaker-python-sdk/blob/045798e893de09c76148ba95b17554b2db4bebc2/src/sagemaker/config/config_schema.py#L1240), so that browser redirects can be handled succesfully. This also helps with other random VPN issues not manging correctly docker traffic.

When set, the `network_mode` parameter should be propagated to each container and `ports` must be discarded (as `network_mode="host"` overrides `ports`, allowing traffic on any port).

**Describe alternatives you've considered**
None worked, no documentation about containers networking can be found in the official docs.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

src/sagemaker/config/config_schema.py のコンテナ設定定義から始め、その設定がローカルの Docker Compose コンテナになる箇所まで追ってください。生成されたコンテナ全体で network_mode と ports が現在どのように処理されているかを確認してください。network_mode="host" の場合にホストネットワーキングが各コンテナに伝播され、ports が省略されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
docker, python
領域
devops, infrastructure
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
50/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。