|
|
|
FROM python:3.10-slim |
|
|
|
|
|
RUN apt-get update && \ |
|
apt-get install -y \ |
|
libopenblas-dev \ |
|
ninja-build \ |
|
build-essential \ |
|
curl |
|
|
|
RUN pip install -U pip setuptools wheel && \ |
|
CMAKE_ARGS="-DLLAMA_OPENBLAS=on" FORCE_CMAKE=1 pip install llama-cpp-python[server] |
|
|
|
|
|
RUN mkdir model && \ |
|
curl -L https://huggingface.co/TheBloke/orca_mini_v2_7B-GGML/resolve/main/orca-mini-v2_7b.ggmlv3.q4_0.bin -o model/ggml-model-q4_0.bin |
|
|
|
COPY ./start_server.sh ./start_server.sh |
|
|
|
|
|
RUN chmod +x ./start_server.sh |
|
|
|
|
|
ENV HOST=0.0.0.0 |
|
ENV PORT=7860 |
|
|
|
|
|
EXPOSE ${PORT} |
|
|
|
|
|
CMD ["/bin/sh", "./start_server.sh"] |