[Deployment Issue] Installation deadlock on Hugging Face Spaces (CPU): Wheels fail (musl/glibc mismatch) & Source builds timeout
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
调研方向
该 issue 涉及在 Hugging Face Spaces 上进行部署。检查 repository 中的 Dockerfile 模式,尤其是 ghcr.io/abetlen/llama-cpp-python 上的官方 image。查看 build 脚本和 CI 配置,以了解如何为不同平台构建 wheel。检查是否已有用于 CPU-only 环境的 Dockerfile。目标是生成一个可正常工作的 Dockerfile,避免使用 musl wheel,并在时间限制内完成构建。
由索引模型根据 Issue 内容生成。
描述
System Info
Platform: Hugging Face Spaces (Docker / CPU Basic Tier)
Base Image: python:3.10-slim (Debian Bookworm)
Goal: Deploy OpenAI-compatible server for a GGUF model.
Description I am unable to deploy llama-cpp-python on a CPU-only Docker environment (Hugging Face Spaces). I have attempted three distinct installation methods, all of which fail.
Describe the solution you'd like
Is there a recommended Docker pattern for Debian-based CPU-only deployments that avoids the musl wheel issue but does not require a full source compilation?
Describe alternatives you've considered
Attempt 1: Pre-built Wheels (Architecture Mismatch) I attempted to install using the CPU-specific extra index URL to avoid compilation time.
Dockerfile:
RUN apt-get update && apt-get install -y build-essential cmake gcc
RUN pip install llama-cpp-python \
--prefer-binary \
--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
Error: The installer pulls a wheel that requires musl, causing a runtime crash on Debian.
OSError: libc.musl-x86_64.so.1: cannot open shared object file: No such file or directory
Attempt 2: Official Docker Image I attempted to use the official image to avoid installation steps entirely. Dockerfile:
FROM ghcr.io/abetlen/llama-cpp-python:latest...
Error: The server fails to start, unable to load the shared library (likely due to GPU/CUDA dependencies in :latest or pathing issues).
FileNotFoundError: Shared library with base name 'llama' not found
Attempt 3: Build from Source I attempted to build from source to ensure correct architecture. Dockerfile:
ENV CMAKE_ARGS="-DGGML_CUDA=off"
RUN pip install llama-cpp-python --no-cache-dir
Error: The build process hits the Hugging Face Spaces timeout limit (hard limit) during the wheel building phase.
Building wheel for llama-cpp-python (pyproject.toml): started
... [Process limits out / Times out]```
- 主要语言
- Python
- 星标
- 10.7k
- 派生
- 1.5k
- 平均合并
- 1 小时 40 分钟
- 30 天内合并 PR
- 5
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
abetlen/llama-cpp-python 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
abetlen/llama-cpp-python#2424 ·
维护者通常 1 天内回复
-
Seven llama_sampler_init_* bindings admit keyword arguments that the ctypes function object silently drops可能已有人在做 @Belal0066 于 59 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
abetlen/llama-cpp-python#2371 ·
维护者通常 1 天内回复
-
uv add llama-cpp-python wheels fails for versions above 0.3.30可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 65/100
abetlen/llama-cpp-python#2352 · 1 条评论 · 3 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
abetlen/llama-cpp-python#2314 ·
维护者通常 1 天内回复
-
Llama.embed() calls LlamaBatch.add_sequence with old 3-arg signature; missing logits_array可能重新可做 @lxcxjxhx 于 136 天前认领,目前没有进行中的 PR。 未关闭
难度 2/5 1-3 小时 新手友好度 65/100
abetlen/llama-cpp-python#2211 · 2 条评论 ·
维护者通常 1 天内回复
查看 abetlen/llama-cpp-python 的全部 Issue
相似的 Issue
-
Bug IronPython Python 3
难度 2/5 1-3 小时 新手友好度 72/100
pyrevitlabs/pyRevit#4184 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 74/100
jqueryscript/awesome-claude-code#1009 ·
-
tests
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 74/100