Spaces:
Runtime error
Runtime error
File size: 962 Bytes
39cb133 c84c1b2 39cb133 c84c1b2 39cb133 c84c1b2 39cb133 c84c1b2 39cb133 c84c1b2 39cb133 c84c1b2 39cb133 b5a074c 39cb133 b5a074c 39cb133 b5a074c 0e50621 39cb133 b5a074c |
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 35 36 37 38 39 40 41 |
ARG UBUNTU_VERSION=20.04
ARG CUDA_VERSION=12.3.1
ARG BASE_CUDA_DEV_CONTAINER=nvidia/cuda:${CUDA_VERSION}-devel-ubuntu${UBUNTU_VERSION}
ARG BASE_CUDA_RUN_CONTAINER=nvidia/cuda:${CUDA_VERSION}-runtime-ubuntu${UBUNTU_VERSION}
FROM ${BASE_CUDA_DEV_CONTAINER} as build
ARG CUDA_DOCKER_ARCH=all
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y git build-essential gcc wget
WORKDIR /build
RUN git clone https://github.com/ggerganov/llama.cpp.git
WORKDIR /build/llama.cpp
ENV CUDA_DOCKER_ARCH=${CUDA_DOCKER_ARCH}
ENV LLAMA_CUBLAS=1
RUN mkdir build && \
cd build && \
cmake .. -DLLAMA_CUBLAS=ON && \
cmake --build . --config Release
FROM ${BASE_CUDA_RUN_CONTAINER} as runtime
WORKDIR /app
# Copy the executable from the build stage
COPY --from=build /build/llama.cpp/build/bin/server /app
COPY ./run.sh /app/run.sh
WORKDIR /app
EXPOSE 7867
# Make the script executable
RUN chmod +x run.sh
# CMD to run your script
CMD ./run.sh |