Spaces:
Running
Running
File size: 671 Bytes
14bc062 30ba37a 2be1a41 14bc062 84395c0 70a01e8 84395c0 70a01e8 84395c0 0b1da4b 84395c0 30ba37a 70a01e8 84395c0 0b1da4b 84395c0 30ba37a 84395c0 30ba37a 70a01e8 |
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 38 |
FROM python:3.10-slim
# 1. Setup User 1000 (Required for HF Spaces)
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
FROM python:3.10-slim
FROM python:3.10-slim
# 1. System dependencies
RUN apt-get update && apt-get install -y \
git \
build-essential \
cmake \
&& rm -rf /var/lib/apt/lists/*
# 2. Install llama-cpp-python with CPU-only flags
ENV CMAKE_ARGS="-DLLAMA_NATIVE=OFF"
ENV FORCE_CMAKE=1
RUN pip install --no-cache-dir \
llama-cpp-python==0.2.90
# 3. App setup
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
CMD ["python", "app.py"]
|