File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ async function generateTemplateFiles(
2828 memoryMB ?: number
2929) : Promise < GeneratedFiles > {
3030 const template = Template ( )
31- . fromImage ( 'sandbox/ base' )
31+ . fromImage ( 'uhub.service.ucloud.cn/agentbox/e2bdev/ base:latest ' )
3232 . runCmd ( 'echo Hello World Sandbox!' )
3333
3434 return generateAndWriteTemplateFiles (
@@ -258,10 +258,13 @@ export const initCommand = new commander.Command('init')
258258 await fs . promises . mkdir ( templateDir , { recursive : true } )
259259
260260 // Step 4: Generate template and build files in the template directory
261+ // Default to 2 CPU cores and 2GB memory (2048 MB)
261262 const generatedFiles = await generateTemplateFiles (
262263 templateDir ,
263264 templateName ,
264- language
265+ language ,
266+ 2 , // cpuCount: 2 cores
267+ 2048 // memoryMB: 2GB
265268 )
266269
267270 // Step 5: Add scripts
Original file line number Diff line number Diff line change @@ -257,7 +257,7 @@ build/%:
257257 expect ( templateContent ) . toContain ( "import { Template } from 'ucloud_sandbox'" )
258258 expect ( templateContent ) . toContain ( 'export const template = Template()' )
259259 expect ( templateContent ) . toContain ( 'fromImage' )
260- expect ( templateContent ) . toContain ( 'sandbox/ base' )
260+ expect ( templateContent ) . toContain ( 'uhub.service.ucloud.cn/agentbox/e2bdev/ base:latest ' )
261261 } )
262262
263263 test ( 'should generate correct Python template content' , async ( ) => {
@@ -277,7 +277,7 @@ build/%:
277277 expect ( templateContent ) . toContain ( 'template = (' )
278278 expect ( templateContent ) . toContain ( 'Template()' )
279279 expect ( templateContent ) . toContain ( 'from_image' )
280- expect ( templateContent ) . toContain ( 'sandbox/ base' )
280+ expect ( templateContent ) . toContain ( 'uhub.service.ucloud.cn/agentbox/e2bdev/ base:latest ' )
281281 } )
282282
283283 test ( 'should generate correct async Python template content' , async ( ) => {
You can’t perform that action at this time.
0 commit comments