File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -189,16 +189,19 @@ export class C2DEngineDocker extends C2DEngine {
189189 const ramGB = this . physicalLimits . get ( 'ram' ) || 0
190190 const physicalDiskGB = this . physicalLimits . get ( 'disk' ) || 0
191191
192- const gpuResources : ComputeResource [ ] = [ ]
192+ const gpuMap = new Map < string , ComputeResource > ( )
193193 for ( const env of envConfig . environments ) {
194194 if ( env . resources ) {
195195 for ( const res of env . resources ) {
196196 if ( res . id !== 'cpu' && res . id !== 'ram' && res . id !== 'disk' ) {
197- gpuResources . push ( res )
197+ if ( ! gpuMap . has ( res . id ) ) {
198+ gpuMap . set ( res . id , res )
199+ }
198200 }
199201 }
200202 }
201203 }
204+ const gpuResources : ComputeResource [ ] = Array . from ( gpuMap . values ( ) )
202205
203206 const benchmarkPrices : ComputeResourcesPricingInfo [ ] = gpuResources . map ( ( gpu ) => ( {
204207 id : gpu . id ,
You can’t perform that action at this time.
0 commit comments