Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +3 -17
Dockerfile
CHANGED
|
@@ -2,20 +2,7 @@ ARG UBUNTU_VERSION=22.04
|
|
| 2 |
ARG CUDA_VERSION=12.2.2
|
| 3 |
ARG CUDA_DOCKER_ARCH=all
|
| 4 |
|
| 5 |
-
FROM nvidia/cuda:${CUDA_VERSION}-
|
| 6 |
-
|
| 7 |
-
RUN apt update && apt install git build-essential libopenblas-dev wget python3-pip pkg-config libcurl4-openssl-dev -y
|
| 8 |
-
RUN mkdir /opt/koboldcpp && mkdir /opt/llamacpp
|
| 9 |
-
RUN git clone https://github.com/lostruins/koboldcpp /opt/koboldcpp && git clone https://github.com/ggerganov/llama.cpp /opt/llamacpp
|
| 10 |
-
|
| 11 |
-
WORKDIR /opt/llamacpp
|
| 12 |
-
RUN make LLAMA_OPENBLAS=1 LLAMA_CUDA=1
|
| 13 |
-
|
| 14 |
-
WORKDIR /opt/koboldcpp
|
| 15 |
-
RUN make LLAMA_OPENBLAS=1 LLAMA_CUBLAS=1 LLAMA_PORTABLE=1
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
FROM nvidia/cuda:${CUDA_VERSION}-devel-ubuntu${UBUNTU_VERSION} as final
|
| 19 |
|
| 20 |
ENV DEBIAN_FRONTEND=noninteractive \
|
| 21 |
TZ=Asia/Jakarta
|
|
@@ -50,9 +37,6 @@ RUN curl -fsSL https://tailscale.com/install.sh | sh
|
|
| 50 |
# Create a working directory
|
| 51 |
WORKDIR /app
|
| 52 |
|
| 53 |
-
COPY --from=builder /opt/koboldcpp /app/koboldcpp
|
| 54 |
-
COPY --from=builder /opt/llamacpp /app/llama.cpp
|
| 55 |
-
|
| 56 |
# Create a non-root user and switch to it
|
| 57 |
RUN adduser --disabled-password --gecos '' --shell /bin/bash user \
|
| 58 |
&& chown -R user:user /app
|
|
@@ -104,6 +88,8 @@ RUN --mount=target=requirements.txt,source=requirements.txt \
|
|
| 104 |
|
| 105 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
| 106 |
COPY --chown=user . $HOME/app
|
|
|
|
|
|
|
| 107 |
|
| 108 |
RUN chmod +x start_server.sh
|
| 109 |
|
|
|
|
| 2 |
ARG CUDA_VERSION=12.2.2
|
| 3 |
ARG CUDA_DOCKER_ARCH=all
|
| 4 |
|
| 5 |
+
FROM nvidia/cuda:${CUDA_VERSION}-runtime-ubuntu${UBUNTU_VERSION}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
ENV DEBIAN_FRONTEND=noninteractive \
|
| 8 |
TZ=Asia/Jakarta
|
|
|
|
| 37 |
# Create a working directory
|
| 38 |
WORKDIR /app
|
| 39 |
|
|
|
|
|
|
|
|
|
|
| 40 |
# Create a non-root user and switch to it
|
| 41 |
RUN adduser --disabled-password --gecos '' --shell /bin/bash user \
|
| 42 |
&& chown -R user:user /app
|
|
|
|
| 88 |
|
| 89 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
| 90 |
COPY --chown=user . $HOME/app
|
| 91 |
+
#COPY --chown=user --from=netora/kobold:latest /opt/koboldcpp /app/koboldcpp
|
| 92 |
+
COPY --chown=user --from=netora/kobold:latest /opt/llamacpp /app/llama.cpp
|
| 93 |
|
| 94 |
RUN chmod +x start_server.sh
|
| 95 |
|