Option of defining an environment script for starting engines (with SSHEngineSetLauncher)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Ambito
- distributed-systems
Direzione di ricerca
Inizia leggendo SSHEngineSetLauncher e SSHLauncher, poi esamina il piccolo script di test multipiattaforma descritto nell’issue e la gestione dell’ambiente da parte di subprocess.Popen. Il lavoro è completato quando uno script di ambiente può preparare l’ambiente dell’engine su Linux e Windows senza fare in modo che l’handle del processo Python punti alla shell, con test di implementazione e documentazione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
We need to adapt the environment before starting the actual ipp engine (through the SSHEngineSetLauncher). Adapting the environment via the environment parameter (in class SSHLauncher) is possible, but it's not very practical, since the launcher needs to know all the engine computer details in advance.
Calling a local environment script before starting the engine would give much more flexibility and would easily allow starting the engine e.g. in a python virtual environment, conda environment, etc.
Although the general idea is quite simple the actual implement is not as easy. The problem: one cannot simply start a shell, next the environment script and then the actual command because the process handle (in python) would point to the shell and not the actual command. Hence, the retrieved process id would be incorrect. Using some system code it would be still possible to retrieve the true process id, but this is especially difficult in windows which is why I tested an alternative solution:
Starting a shell, outputting all environment variable, running the environment script and outputting all environment variable again. A bit of python code analyses the output and collects the environment variable changes (especially added and/or changed env.vars). I have implemented a small test script that works under linux and windows.
The collected changes can then be easily passed to the env parameter of subprocess.Popen function.
Does this sound like an appropriate idea and solution?
As before I'm happy to provide the implementation, tests, documentation, etc.
- Lingua principale
- Jupyter Notebook
- Stelle
- 2.6k
- Fork
- 1k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ipython/ipyparallel
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
ipython/ipyparallel#984 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
ipython/ipyparallel#937 · 4 commenti ·
-
Packages and definitions loaded in the regular kernel are not known by engines and vice versa Apertaquestion
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
ipython/ipyparallel#897 · 12 commenti ·
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
ipython/ipyparallel#882 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
ipython/ipyparallel#851 · 1 commento ·
Tutte le issue di ipython/ipyparallel
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
huggingface/pytorch-image-models#2800 · 1 commento ·
-
bug examples invalid iris
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
ai_reviewed
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
ydb-platform/ydb#53838 · 3 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
NovaSky-AI/SkyRL#2263 ·