Spaces:
Sleeping
Sleeping
File size: 794 Bytes
a02eb7c | 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 ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
# Install system dependencies
RUN apt update && apt install -y \
build-essential \
git \
cmake \
python3 \
python3-pip \
curl \
&& rm -rf /var/lib/apt/lists/*
# Build llama.cpp
RUN git clone https://github.com/ggerganov/llama.cpp /llama.cpp \
&& cd /llama.cpp \
&& cmake -B build -DCMAKE_BUILD_TYPE=Release -DLLAMA_CURL=OFF \
&& cmake --build build
# Set working directory
WORKDIR /app
# Install Python dependencies
COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt
# Copy application files
COPY app.py .
COPY model/ ./model/
# Expose HTTP port (Hugging Face Spaces uses 7860)
EXPOSE 7860
# Start backend server
CMD ["python3", "app.py"]
|