YARN-9160. [Submarine] Document 'PYTHONPATH' environment variable setting when using -localization options. (Zhankun Tang via wangda)

Change-Id: I115b6710eb11501e21ab3e9e7cd1a87f322e5cf8
This commit is contained in:
Wangda Tan 2019-01-06 10:25:35 -08:00
parent 8f004fe4e0
commit 2c02aa6ec2

View File

@ -87,6 +87,24 @@ usage: job run
-localization "/user/yarn/mydir3:/opt/mydir3"
-localization "./mydir1:."
```
#### Notes:
When using `localization` option to make a collection of dependency Python
scripts available to entry python script in the container, you may also need to
set `PYTHONPATH` environment variable as below to avoid module import error
reported from `entry_script.py`.
```
... job run
# the entry point
--localization entry_script.py:<path>/entry_script.py
# the dependency Python scripts of the entry point
--localization other_scripts_dir:<path>/other_scripts_dir
# the PYTHONPATH env to make dependency available to entry script
--env PYTHONPATH="<path>/other_scripts_dir"
--worker_launch_cmd "python <path>/entry_script.py ..."
```
### Submarine Configuration
For submarine internal configuration, please create a `submarine.xml` which should be placed under `$HADOOP_CONF_DIR`.