File tree Expand file tree Collapse file tree
crates/openshell-driver-docker/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -370,12 +370,17 @@ impl DockerComputeDriver {
370370 . as_ref ( )
371371 . ok_or_else ( || Status :: invalid_argument ( "sandbox.spec.template is required" ) ) ?;
372372
373+ Self :: validate_sandbox_template ( template) ?;
374+ Self :: validate_gpu_request ( spec. gpu , config. supports_gpu ) ?;
375+ Ok ( ( ) )
376+ }
377+
378+ fn validate_sandbox_template ( template : & DriverSandboxTemplate ) -> Result < ( ) , Status > {
373379 if template. image . trim ( ) . is_empty ( ) {
374380 return Err ( Status :: failed_precondition (
375381 "docker sandboxes require a template image" ,
376382 ) ) ;
377383 }
378- Self :: validate_gpu_request ( spec. gpu , config. supports_gpu ) ?;
379384 if !template. agent_socket_path . trim ( ) . is_empty ( ) {
380385 return Err ( Status :: failed_precondition (
381386 "docker compute driver does not support template.agent_socket_path" ,
You can’t perform that action at this time.
0 commit comments