mirror of
https://github.com/wassname/ray.git
synced 2026-08-03 13:10:57 +08:00
[autoscaler/docker] Docker Inititialization Revamp (#9515)
* Basic idea * Small fixes * dockerize start commands in Command Runner * Remove run_init from CommandRunnerInterface * Add Parens Co-authored-by: Simon Mo <simon.mo@hey.com> * Cleaning up * Response to richards comments * Further small fixes * Fix Json * schema format fix * cleanup * run more often * fix indent * Fix richards responses * fix ups * remove docker_commands from schema * default to list * fix docker cmd runner test * lint fix Co-authored-by: Simon Mo <simon.mo@hey.com>
This commit is contained in:
@@ -9,7 +9,7 @@ from typing import Any, Dict
|
||||
import ray
|
||||
import ray.services as services
|
||||
from ray.autoscaler.node_provider import get_default_config
|
||||
from ray.autoscaler.docker import dockerize_if_needed
|
||||
from ray.autoscaler.docker import validate_docker_config
|
||||
|
||||
REQUIRED, OPTIONAL = True, False
|
||||
RAY_SCHEMA_PATH = os.path.join(
|
||||
@@ -56,7 +56,7 @@ def validate_config(config: Dict[str, Any]) -> None:
|
||||
try:
|
||||
jsonschema.validate(config, schema)
|
||||
except jsonschema.ValidationError as e:
|
||||
raise jsonschema.ValidationError(message=e.message) from None
|
||||
raise e from None
|
||||
|
||||
# Detect out of date defaults. This happens when the autoscaler that filled
|
||||
# out the default values is older than the version of the autoscaler that
|
||||
@@ -90,7 +90,7 @@ def validate_config(config: Dict[str, Any]) -> None:
|
||||
def prepare_config(config):
|
||||
with_defaults = fillout_defaults(config)
|
||||
merge_setup_commands(with_defaults)
|
||||
dockerize_if_needed(with_defaults)
|
||||
validate_docker_config(with_defaults)
|
||||
return with_defaults
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user