This repository was archived by the owner on May 15, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,30 @@ const executeScriptInContainerWithPip = async (
3333 } ;
3434} ;
3535
36+ // executes the coder script after installing jupyterlab
37+ const executeScriptInContainerWithJupyterLabInstalled = async (
38+ state : TerraformState ,
39+ image : string ,
40+ shell = "sh" ,
41+ ) : Promise < {
42+ exitCode : number ;
43+ stdout : string [ ] ;
44+ stderr : string [ ] ;
45+ } > => {
46+ const instance = findResourceInstance ( state , "coder_script" ) ;
47+ const id = await runContainer ( image ) ;
48+ const respPipx = await execContainer ( id , [ shell , "-c" , "apk add pipx" ] ) ;
49+ const respPipInstall = await execContainer ( id , [ shell , "-c" , "pipx install jupyterlab" ] ) ;
50+ const resp = await execContainer ( id , [ shell , "-c" , instance . script ] ) ;
51+ const stdout = resp . stdout . trim ( ) . split ( "\n" ) ;
52+ const stderr = resp . stderr . trim ( ) . split ( "\n" ) ;
53+ return {
54+ exitCode : resp . exitCode ,
55+ stdout,
56+ stderr,
57+ } ;
58+ } ;
59+
3660// executes the coder script after installing pip
3761const executeScriptInContainerWithUv = async (
3862 state : TerraformState ,
You can’t perform that action at this time.
0 commit comments