File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -141,8 +141,13 @@ export class ComputeInitializeHandler extends Handler {
141141 if ( hasDockerImages ) {
142142 const algoImage = getAlgorithmImage ( task . algorithm )
143143 if ( algoImage ) {
144- const validation : ValidateParams =
145- await C2DEngineDocker . checkDockerImage ( algoImage )
144+ const env = await this . getOceanNode ( )
145+ . getC2DEngines ( )
146+ . getExactComputeEnv ( task . compute . env , ddo . chainId )
147+ const validation : ValidateParams = await C2DEngineDocker . checkDockerImage (
148+ algoImage ,
149+ env . platform
150+ )
146151 if ( ! validation . valid ) {
147152 return {
148153 stream : null ,
Original file line number Diff line number Diff line change @@ -401,7 +401,7 @@ function getDockerFreeComputeOptions(
401401 feeToken : ZeroAddress ,
402402 chainId : 8996 ,
403403 free : true ,
404- platform : [ { architecture : os . machine ( ) , os : os . platform ( ) } ]
404+ platform : { architecture : os . machine ( ) , os : os . platform ( ) }
405405 }
406406
407407 if ( existsEnvironmentVariable ( ENVIRONMENT_VARIABLES . DOCKER_FREE_COMPUTE , isStartup ) ) {
@@ -411,7 +411,7 @@ function getDockerFreeComputeOptions(
411411 ) as ComputeEnvironmentBaseConfig
412412 doComputeEnvChecks ( [ options ] )
413413 const env = { ...options } as ComputeEnvironment
414- env . platform = [ { architecture : os . machine ( ) , os : os . platform ( ) } ]
414+ env . platform = { architecture : os . machine ( ) , os : os . platform ( ) }
415415 return env
416416 } catch ( error ) {
417417 CONFIG_LOGGER . logMessageWithEmoji (
@@ -462,7 +462,7 @@ function getDockerComputeEnvironments(isStartup?: boolean): ComputeEnvironment[]
462462 doComputeEnvChecks ( options )
463463 const envs = { ...options } as ComputeEnvironment [ ]
464464 envs . forEach ( ( env ) => {
465- env . platform = [ { architecture : os . machine ( ) , os : os . platform ( ) } ]
465+ env . platform = { architecture : os . machine ( ) , os : os . platform ( ) }
466466 } )
467467 return envs
468468 } catch ( error ) {
You can’t perform that action at this time.
0 commit comments