File size: 930 Bytes
9c1188f 4213f50 9c1188f 4213f50 9c1188f 4213f50 |
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 |
# Use an official Python runtime as a parent image
FROM python:3.8-slim
# Set the working directory in the container
WORKDIR /usr/src/app
# Install system dependencies
RUN apt-get update && apt-get install -y \
wget \
git \
build-essential
# Clone llama.cpp
RUN git clone https://github.com/ggerganov/llama.cpp.git
# Download the model
RUN cd llama.cpp/models && \
wget -O stablelm-2-zephyr-1_6b-Q4_0.gguf https://huggingface.co/stabilityai/stablelm-2-zephyr-1_6b/resolve/main/stablelm-2-zephyr-1_6b-Q4_0.gguf?download=true
# Build llama.cpp
RUN cd llama.cpp && \
make -j
# Copy the current directory contents into the container at /usr/src/app
COPY . .
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Make port 7860 available to the world outside this container
EXPOSE 7860
# Run app.py when the container launches
CMD ["python", "./app.py"] |