4moha commited on
Commit
d7a8652
·
verified ·
1 Parent(s): 302e161

fix: apt-install cmake + build-essential before llama.cpp build

Browse files
Files changed (1) hide show
  1. convert_gguf.py +5 -1
convert_gguf.py CHANGED
@@ -58,7 +58,11 @@ def main() -> None:
58
  str(merged_dir), "--outtype", "f16", "--outfile", str(f16_path),
59
  ], check=True)
60
 
61
- print(f"[5/5] Building quantize binary and writing {QUANTIZE.upper()}")
 
 
 
 
62
  subprocess.run(["cmake", "-B", "llama.cpp/build", "llama.cpp"], check=True)
63
  subprocess.run(["cmake", "--build", "llama.cpp/build", "--target", "llama-quantize", "-j"], check=True)
64
  quantize_bin = "llama.cpp/build/bin/llama-quantize"
 
58
  str(merged_dir), "--outtype", "f16", "--outfile", str(f16_path),
59
  ], check=True)
60
 
61
+ print(f"[5/5] Installing build tools + building quantize binary, writing {QUANTIZE.upper()}")
62
+ # The uv Docker image (python3.12-bookworm) has no cmake by default. Install
63
+ # via apt (container runs as root). build-essential brings gcc/g++/make.
64
+ subprocess.run(["apt-get", "update", "-qq"], check=True)
65
+ subprocess.run(["apt-get", "install", "-y", "-qq", "cmake", "build-essential"], check=True)
66
  subprocess.run(["cmake", "-B", "llama.cpp/build", "llama.cpp"], check=True)
67
  subprocess.run(["cmake", "--build", "llama.cpp/build", "--target", "llama-quantize", "-j"], check=True)
68
  quantize_bin = "llama.cpp/build/bin/llama-quantize"