CoolFace
Apppublic

muryshev/llama-cpp-server-7b

sourceHugging Facemitupdated 3y agoView on Hugging Face
0likes
Dockerfile43 linesDownload Raw Back to root
1ARG UBUNTU_VERSION=22.042ARG CUDA_VERSION=12.3.13ARG BASE_CUDA_DEV_CONTAINER=nvidia/cuda:${CUDA_VERSION}-devel-ubuntu${UBUNTU_VERSION}4ARG BASE_CUDA_RUN_CONTAINER=nvidia/cuda:${CUDA_VERSION}-runtime-ubuntu${UBUNTU_VERSION}5 6FROM ${BASE_CUDA_DEV_CONTAINER} as build7 8ARG CUDA_DOCKER_ARCH=all9 10RUN apt-get update && apt-get upgrade -y && \11    apt-get install -y git build-essential gcc wget cmake12 13WORKDIR /build14 15RUN git clone https://github.com/ggerganov/llama.cpp.git16 17WORKDIR /build/llama.cpp18 19ENV CUDA_DOCKER_ARCH=${CUDA_DOCKER_ARCH}20ENV LLAMA_CUBLAS=121 22RUN mkdir build && \23    cd build && \24    cmake .. -DLLAMA_CUBLAS=ON && \25    cmake --build . --config Release26 27FROM ${BASE_CUDA_RUN_CONTAINER} as runtime28RUN apt-get update && apt-get upgrade -y && \29    apt-get install -y wget30 31WORKDIR /app32 33# Copy the executable from the build stage34COPY --from=build /build/llama.cpp/build/bin/server /app35COPY ./run.sh /app/run.sh36WORKDIR /app37EXPOSE 786738 39# Make the script executable40RUN chmod +x run.sh41 42# CMD to run your script43CMD ./run.sh