Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,7 @@ protected void containerIsStarted(InspectContainerResponse containerInfo, boolea
executeCommand("apt-get", "upgrade", "-y");
executeCommand("apt-get", "install", "-y", "python3-pip");
executeCommand("pip", "install", "huggingface-hub");
executeCommand(
"huggingface-cli",
"download",
huggingFaceModel.repository,
huggingFaceModel.model,
"--local-dir",
"."
);
executeCommand("hf", "download", huggingFaceModel.repository, huggingFaceModel.model, "--local-dir", ".");
executeCommand("sh", "-c", String.format("echo '%s' > Modelfile", huggingFaceModel.modelfileContent));
executeCommand("ollama", "create", huggingFaceModel.model, "-f", "Modelfile");
executeCommand("rm", huggingFaceModel.model);
Expand All @@ -48,7 +41,7 @@ private void executeCommand(String... command) throws ContainerLaunchException,
ExecResult execResult = execInContainer(command);
if (execResult.getExitCode() > 0) {
throw new ContainerLaunchException(
"Failed to execute " + String.join(" ", command) + ": " + execResult.getStderr()
"Failed to execute " + String.join(" ", command) + ": " + execResult.getStdout()
);
}
}
Expand Down
Loading