File size: 1,031 Bytes
3154d4b
 
5007eec
3154d4b
5007eec
 
3154d4b
 
 
 
 
 
 
 
5007eec
3154d4b
5348000
3154d4b
9b5dac6
3154d4b
8d02d7a
3154d4b
 
 
 
5007eec
3154d4b
 
 
dccf332
3154d4b
dccf332
5007eec
8d02d7a
5007eec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Using a robust Ubuntu-based Python environment
FROM python:3.10-bullseye

# Set working directory
WORKDIR /app

# 1. Install ESSENTIAL build tools and common libraries
# This ensures every standard C library is available
RUN apt-get update && apt-get install -y \
    build-essential \
    python3-dev \
    libgl1 \
    libglib2.0-0 \
    && rm -rf /var/lib/apt/lists/*

# 2. Prevent the system from ever looking for 'musl'
ENV PIP_NO_CACHE_DIR=1
ENV PIP_PREFER_BINARY=1

# 3. Step-by-Step Stable Install
RUN pip install --upgrade pip
RUN pip install numpy==1.26.4
RUN pip install cryptography==42.0.5
RUN pip install huggingface_hub==0.23.0
RUN pip install gradio==4.44.0 fastapi uvicorn

# 4. FORCE INSTALL the CPU-only Glibc-compatible wheel
# We are using a specific older stable version known to work on Debian Bullseye
RUN pip install llama-cpp-python==0.2.76 --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu

# 5. Finalize
COPY . .
EXPOSE 7860
ENV GRADIO_SERVER_NAME="0.0.0.0"
CMD ["python", "app.py"]