aws / aws/sagemaker-python-sdk
Support network_mode=host for local testing
- Lingua principale
- Python
- Stelle
- 2.3k
- Fork
- 1.3k
- Merge medio
- 1g 22h
- PR unite (30g)
- 35
Descrizione
**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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia da src/sagemaker/config/config_schema.py, alla definizione della configurazione del container, quindi segui il punto in cui tale configurazione diventa i container Docker Compose locali. Verifica come vengono attualmente gestiti network_mode e ports nei container generati. Il lavoro è completato quando il networking dell’host viene propagato a ogni container e ports viene omesso quando network_mode="host".
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- docker, python
- Ambito
- devops, infrastructure
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 50/100