forked from eoeair/cenv
25 lines
734 B
Docker
25 lines
734 B
Docker
FROM eoelab.org:1027/ben0i0d/cenv:base
|
|
|
|
USER root
|
|
|
|
RUN apt-get update --yes && apt-get install --yes gcc gdb cmake build-essential git libcurl4-openssl-dev && \
|
|
apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR "${HOME}"
|
|
|
|
# install llama
|
|
RUN git clone https://github.com/ggerganov/llama.cpp.git
|
|
|
|
WORKDIR /llama.cpp
|
|
|
|
RUN cmake -S . -B build -DGGML_BACKEND_DL=ON -DGGML_NATIVE=OFF -DGGML_CPU_ALL_VARIANTS=ON -DLLAMA_CURL=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF && \
|
|
cmake --build build -j $(nproc)
|
|
|
|
WORKDIR "${HOME}"
|
|
|
|
RUN mv /llama.cpp/build/bin/llama-server /usr/local/bin/llama-server && \
|
|
rm -rf /llama.cpp
|
|
|
|
HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ]
|
|
|
|
ENTRYPOINT [ "llama-server" ] |