[Deployment Issue] Installation deadlock on Hugging Face Spaces (CPU): Wheels fail (musl/glibc mismatch) & Source builds timeout

Aperta
#2,118 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
cmake, docker, python
Ambito
backend, cloud, devops

Direzione di ricerca

La issue riguarda il deployment su Hugging Face Spaces. Esamina i pattern dei Dockerfile nel repository, in particolare l’immagine ufficiale all’indirizzo ghcr.io/abetlen/llama-cpp-python. Esamina gli script di build e le configurazioni CI per capire come vengono creati i wheel per piattaforme diverse. Verifica se esistono già Dockerfile per ambienti CPU-only. L’obiettivo è produrre un Dockerfile funzionante che eviti i wheel musl e venga compilato entro i limiti di tempo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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]```
Lingua principale
Python
Stelle
10.7k
Fork
1.5k
Merge medio
1h 40m
PR unite (30g)
5

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di abetlen/llama-cpp-python

Tutte le issue di abetlen/llama-cpp-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.