FROM ubuntu:22.04 | |
# Install dependencies | |
RUN apt-get update && apt-get install -y \ | |
git \ | |
build-essential \ | |
cmake \ | |
curl \ | |
python3-pip \ | |
&& rm -rf /var/lib/apt/lists/* | |
# Install llama.cpp | |
RUN cd / && git clone https://github.com/ggerganov/llama.cpp && cd llama.cpp && make | |
# Setup model directory | |
WORKDIR /models | |
# Python dependencies | |
COPY requirements.txt . | |
RUN pip install -r requirements.txt | |
# Copy app files | |
COPY app.py . | |
# Download model and start server | |
CMD ["bash", "-c", "cd /models && python3 app.py"] |