@@ -28,14 +28,7 @@ protected void containerIsStarted(InspectContainerResponse containerInfo, boolea
2828 executeCommand ("apt-get" , "upgrade" , "-y" );
2929 executeCommand ("apt-get" , "install" , "-y" , "python3-pip" );
3030 executeCommand ("pip" , "install" , "huggingface-hub" );
31- executeCommand (
32- "huggingface-cli" ,
33- "download" ,
34- huggingFaceModel .repository ,
35- huggingFaceModel .model ,
36- "--local-dir" ,
37- "."
38- );
31+ executeCommand ("hf" , "download" , huggingFaceModel .repository , huggingFaceModel .model , "--local-dir" , "." );
3932 executeCommand ("sh" , "-c" , String .format ("echo '%s' > Modelfile" , huggingFaceModel .modelfileContent ));
4033 executeCommand ("ollama" , "create" , huggingFaceModel .model , "-f" , "Modelfile" );
4134 executeCommand ("rm" , huggingFaceModel .model );
@@ -48,7 +41,7 @@ private void executeCommand(String... command) throws ContainerLaunchException,
4841 ExecResult execResult = execInContainer (command );
4942 if (execResult .getExitCode () > 0 ) {
5043 throw new ContainerLaunchException (
51- "Failed to execute " + String .join (" " , command ) + ": " + execResult .getStderr ()
44+ "Failed to execute " + String .join (" " , command ) + ": " + execResult .getStdout ()
5245 );
5346 }
5447 }
0 commit comments