让射线工作者在某个目录和某个虚拟环境中运行的秘诀是什么?我觉得我错过了一些最基本的东西:
我想运行射线调优来进行超参数调优(使用aws)。当我启动头部(和工作人员)时,我想从虚拟机中运行射线(在我的例子中是诗歌)。只是根本不起作用。我试过:
setup_commands:
- cd /home/ubuntu/myimportantdirectory
- poetry shell
但后来我得到了
2020-02-25 17:34:28,592 INFO updater.py:256 -- NodeUpdater: i-0893fd1914fd8743e: Running cd /home/ubuntu/myimportantdirectory on 18.207.133.151...
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
..。我猜这意味着它失败了,因为诗歌在could not find a pyproject.toml file in /home/ubuntu or its parents
中失败了
我也试过
setup_commands:
- cd /home/ubuntu/myimportantdirectory
- . path/to/poetry/activate
但是我得到了Command 'ray' not found
,尽管我确信它在那里。
发布于 2020-02-26 01:46:12
这个很管用。但肯定有更好的办法。我也不敢相信这没被记录下来。在yaml中,这样做:
head_start_ray_commands:
- . /home/ubuntu/.cache/pypoetry/virtualenvs/robotics-7LCEAdjK-py3.6/bin/activate; ray stop
- ulimit -n 65536; . /home/ubuntu/.cache/pypoetry/virtualenvs/robotics-7LCEAdjK-py3.6/bin/activate; ray start --head --redis-port=6379 --object-manager-port=8076 --autoscaling-config=~/ray_bootstrap_config.yaml
worker_start_ray_commands:
- . /home/ubuntu/.cache/pypoetry/virtualenvs/robotics-7LCEAdjK-py3.6/bin/activate; ray stop
- ulimit -n 65536; . /home/ubuntu/.cache/pypoetry/virtualenvs/robotics-7LCEAdjK-py3.6/bin/activate; ray start --redis-address=$RAY_HEAD_IP:6379 --object-manager-port=8076
https://stackoverflow.com/questions/60404228
复制相似问题