Spaces:
Sleeping
Sleeping
File size: 897 Bytes
c59a45c 4c4ac8d c59a45c 655a930 03e3e8c 655a930 c59a45c 4223c91 ba0c553 655a930 4c4ac8d 2f1ff94 e6c8a8d 2f1ff94 ba0c553 c59a45c 4c4ac8d 655a930 ba0c553 4c4ac8d 655a930 390847a | 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 36 37 | FROM python:3.11-slim
# Install Node.js (for promptfoo) and system tools
RUN apt-get update && apt-get install -y \
curl \
git \
nodejs \
npm \
&& rm -rf /var/lib/apt/lists/*
# Install promptfoo globally
RUN npm install -g promptfoo
WORKDIR /app
# --- ULTIMATE FIX: Force Specific Platform ---
RUN pip download --only-binary :all: \
--platform manylinux_2_17_x86_64 \
--python-version 311 \
--implementation cp \
--abi cp311 \
"llama-cpp-python" \
--extra-index-url "https://abetlen.github.io/llama-cpp-python/whl/cpu" \
-d /tmp/wheels
RUN pip install --no-cache-dir /tmp/wheels/llama*.whl && rm -rf /tmp/wheels
# --- Install Standard Requirements ---
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
EXPOSE 7860
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"] |