-
Notifications
You must be signed in to change notification settings - Fork 1.8k
rename preCommand to pythonPath #3410
Changes from all commits
1f6f6c1
ff8d9be
9bbb6f0
f805c55
f6855db
22e8b0c
f6937a0
8c65e65
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,9 +24,9 @@ machineList: | |
- ip: ${replace_to_your_remote_machine_ip} | ||
username: ${replace_to_your_remote_machine_username} | ||
sshKeyPath: ${replace_to_your_remote_machine_sshKeyPath} | ||
# Pre-command will be executed before the remote machine executes other commands. | ||
# Below is an example of specifying python environment. | ||
# If you want to execute multiple commands, please use "&&" to connect them. | ||
# preCommand: source ${replace_to_absolute_path_recommended_here}/bin/activate | ||
# preCommand: source ${replace_to_conda_path}/bin/activate ${replace_to_conda_env_name} | ||
preCommand: export PATH=${replace_to_python_environment_path_in_your_remote_machine}:$PATH | ||
# Below are examples of specifying python environment. | ||
# pythonPath: /opt/python3.7/bin | ||
# pythonPath: C:/Python37 | ||
# Below is an example of specifying python environment for windows anaconda user. Multiple paths separated by ';'. | ||
# pythonPath: C:/Users/yourname/.conda/envs/myenv;C:/Users/yourname/.conda/envs/myenv/Scripts;C:/Users/yourname/.conda/envs/myenv/Library/bin | ||
pythonPath: ${replace_to_python_environment_path_in_your_remote_machine} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. better to add comments to show concrete path examples here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The doc said "The path will insert to PATH before launching each trial". Is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is a directory, "python3.7" is a folder name..I will rename it to "yourPythonPath" to avoid the misunderstanding. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Then I suggest There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does it work? If I execute a command line tool that uses python, for example, nnictl, lightgbm, horovodrun, will it work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you set this pythonPath, it will be added to the front of env PATH in current terminal, which means when you run any tool that calls python or run python directly from the terminal, this python your provided the path will be chosen first.
But it only works for current terminal which your set the pythonPath at first.