| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -22,7 +22,7 @@ const executeScriptInContainerWithPip = async (
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}> => {
 | 
					 | 
					 | 
					 | 
					}> => {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  const instance = findResourceInstance(state, "coder_script");
 | 
					 | 
					 | 
					 | 
					  const instance = findResourceInstance(state, "coder_script");
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  const id = await runContainer(image);
 | 
					 | 
					 | 
					 | 
					  const id = await runContainer(image);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  const respPip = await execContainer(id, [shell, "-c", "apk add py3-pip"]);
 | 
					 | 
					 | 
					 | 
					  const respPipx = await execContainer(id, [shell, "-c", "apk add pipx"]);
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  const resp = await execContainer(id, [shell, "-c", instance.script]);
 | 
					 | 
					 | 
					 | 
					  const resp = await execContainer(id, [shell, "-c", instance.script]);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  const stdout = resp.stdout.trim().split("\n");
 | 
					 | 
					 | 
					 | 
					  const stdout = resp.stdout.trim().split("\n");
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  const stderr = resp.stderr.trim().split("\n");
 | 
					 | 
					 | 
					 | 
					  const stderr = resp.stderr.trim().split("\n");
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -40,7 +40,7 @@ describe("jupyterlab", async () => {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    agent_id: "foo",
 | 
					 | 
					 | 
					 | 
					    agent_id: "foo",
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  });
 | 
					 | 
					 | 
					 | 
					  });
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  it("fails without pip3", async () => {
 | 
					 | 
					 | 
					 | 
					  it("fails without pipx", async () => {
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    const state = await runTerraformApply(import.meta.dir, {
 | 
					 | 
					 | 
					 | 
					    const state = await runTerraformApply(import.meta.dir, {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      agent_id: "foo",
 | 
					 | 
					 | 
					 | 
					      agent_id: "foo",
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    });
 | 
					 | 
					 | 
					 | 
					    });
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -48,14 +48,14 @@ describe("jupyterlab", async () => {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    expect(output.exitCode).toBe(1);
 | 
					 | 
					 | 
					 | 
					    expect(output.exitCode).toBe(1);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    expect(output.stdout).toEqual([
 | 
					 | 
					 | 
					 | 
					    expect(output.stdout).toEqual([
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      "\u001B[0;1mInstalling jupyterlab!",
 | 
					 | 
					 | 
					 | 
					      "\u001B[0;1mInstalling jupyterlab!",
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      "pip3 is not installed",
 | 
					 | 
					 | 
					 | 
					      "pipx is not installed",
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      "Please install pip3 in your Dockerfile/VM image before running this script",
 | 
					 | 
					 | 
					 | 
					      "Please install pipx in your Dockerfile/VM image before running this script",
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    ]);
 | 
					 | 
					 | 
					 | 
					    ]);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  });
 | 
					 | 
					 | 
					 | 
					  });
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  // TODO: Add faster test to run with pip3.
 | 
					 | 
					 | 
					 | 
					  // TODO: Add faster test to run with pipx.
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  // currently times out.
 | 
					 | 
					 | 
					 | 
					  // currently times out.
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  // it("runs with pip3", async () => {
 | 
					 | 
					 | 
					 | 
					  // it("runs with pipx", async () => {
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  //   ...
 | 
					 | 
					 | 
					 | 
					  //   ...
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  //   const output = await executeScriptInContainerWithPip(state, "alpine");
 | 
					 | 
					 | 
					 | 
					  //   const output = await executeScriptInContainerWithPip(state, "alpine");
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  //   ...
 | 
					 | 
					 | 
					 | 
					  //   ...
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
 
 |