我正在尝试使用配置文件中的file_mounts块将少量文件分发到AWS EC2上的Ray集群中的每个节点:-
file_mounts:{ “ ./”:“ ./run_files” }
集群仅在主节点启动时,已将run_files目录的内容正确复制到该主节点上。但是,请求的两个工作程序节点不会启动。如果我省略file_mounts部分,则工作程序启动。 Ray监视器指示在Anaconda3安装的matplotlib子目录中找到文件libtcl.so时存在问题。该文件在主节点上的正确路径上,因此工作节点上的设置似乎无法正常工作:-
$ ray exec ray_conf.yaml 'tail -n 100 -f /tmp/ray/session_*/logs/monitor*'
2019-05-29 19:36:14,019 INFO updater.py:95 -- NodeUpdater: Waiting for IP of i-073950262949fe9a8...
2019-05-29 19:36:14,019 INFO log_timer.py:21 -- NodeUpdater: i-073950262949fe9a8: Got IP [LogTimer=362ms]
2019-05-29 19:36:14,025 INFO updater.py:272 -- NodeUpdater: Running tail -n 100 -f /tmp/ray/session_*/logs/monitor* on 54.175.173.233...
==> /tmp/ray/session_2019-05-29_23-35-49_842129_4407/logs/monitor.err <==
Traceback (most recent call last):
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/ray/monitor.py", line 376, in <module>
redis_password=args.redis_password)
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/ray/monitor.py", line 54, in __init__
self.load_metrics)
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/ray/autoscaler/autoscaler.py", line 349, in __init__
self.reload_config(errors_fatal=True)
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/ray/autoscaler/autoscaler.py", line 523, in reload_config
raise e
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/ray/autoscaler/autoscaler.py", line 516, in reload_config
new_config["worker_start_ray_commands"]
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/ray/autoscaler/autoscaler.py", line 790, in hash_runtime_conf
add_content_hashes(local_path)
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/ray/autoscaler/autoscaler.py", line 778, in add_content_hashes
add_hash_of_file(fpath)
File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/ray/autoscaler/autoscaler.py", line 764, in add_hash_of_file
with open(fpath, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: './anaconda3/pkgs/matplotlib-2.1.0-py36hba5de38_0/lib/libtcl.so'
==> /tmp/ray/session_2019-05-29_23-35-49_842129_4407/logs/monitor.out <==
(请注意,此问题来自“不通过ray在EC2上启动工作程序”这个问题,我继续提出一个新问题,因为现在更具体地确定了错误的来源。)
答案 0 :(得分:1)
我认为libtcl.so错误消息非常容易引起误解。问题在于file_mounts远程路径不能是工作程序上的主目录(./或〜/都不能);它必须是一个子目录。因此,以下操作成功完成:-
file_mounts: {"~/run_files": "./run_files"}