Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from ggerganov:master #162

Closed
wants to merge 32 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d62b532
Use model->gguf_kv for loading the template instead of using the C AP…
dranger003 Dec 17, 2024
4da69d1
Revert "llama : add Falcon3 support (#10864)" (#10876)
slaren Dec 18, 2024
6b064c9
docs: Fix HIP (née hipBLAS) in README (#10880)
brianredbeard Dec 18, 2024
4682887
server : (embeddings) using same format for "input" and "content" (#1…
ngxson Dec 18, 2024
0e70ba6
server : add "tokens" output (#10853)
ggerganov Dec 18, 2024
152610e
server : output embeddings for all tokens when pooling = none (#10861)
ggerganov Dec 18, 2024
7bbb5ac
server: avoid overwriting Authorization header (#10878)
vesath Dec 18, 2024
0bf2d10
tts : add OuteTTS support (#10784)
ggerganov Dec 18, 2024
9177484
ggml : fix arm build (#10890)
slaren Dec 18, 2024
7909e85
llama-run : improve progress bar (#10821)
ericcurtin Dec 19, 2024
cd920d0
tests: disable GGUF test for bad value size (#10886)
JohannesGaessler Dec 19, 2024
7585edb
convert : Add support for Microsoft Phi-4 model (#10817)
fairydreaming Dec 19, 2024
2fffc52
llama : fix Roberta embeddings (#10856)
Ssukriti Dec 19, 2024
a3c33b1
ggml: fix arm build with gcc (#10895)
angt Dec 19, 2024
57bb2c4
server : fix logprobs, make it OAI-compatible (#10783)
ngxson Dec 19, 2024
36319de
tts : small QoL for easy model fetch (#10903)
ggerganov Dec 19, 2024
5cab3e4
llama : minor grammar refactor (#10897)
ggerganov Dec 19, 2024
d408bb9
clip : disable GPU support (#10896)
ggerganov Dec 19, 2024
0a11f8b
convert : fix RWKV v6 model conversion (#10913)
MollySophia Dec 20, 2024
21ae3b9
ggml : add test for SVE and disable when it fails (#10906)
slaren Dec 20, 2024
0ca416c
server : (UI) fix copy to clipboard function (#10916)
ngxson Dec 20, 2024
eb5c3dc
SYCL: Migrate away from deprecated ggml_tensor->backend (#10840)
qnixsynapse Dec 20, 2024
e34c5af
ggml-cpu: replace NEON asm with intrinsics in ggml_gemv_q4_0_4x8_q8_0…
angt Dec 20, 2024
a91a413
vulkan: optimize coopmat2 dequant functions (#10855)
jeffbolznv Dec 21, 2024
5cd85b5
convert : add BertForMaskedLM (#10919)
ggerganov Dec 21, 2024
ebdee94
vulkan: build fixes for 32b (#10927)
jeffbolznv Dec 22, 2024
7ae33a6
llama : add Falcon3 support (#10883)
mokeddembillel Dec 22, 2024
7c0e285
devops : add docker-multi-stage builds (#10832)
rudiservo Dec 22, 2024
7024d59
ggml : fix run-time on FreeBSD in get_executable_path() (#10948)
yurivict Dec 23, 2024
dab76c9
llama-run : include temperature option (#10899)
ericcurtin Dec 23, 2024
6f0c9e0
llama : support for Llama-3_1-Nemotron-51B (#10669)
ymcki Dec 23, 2024
b92a14a
llama : support InfiniAI Megrez 3b (#10893)
dixyes Dec 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
devops : add docker-multi-stage builds (ggml-org#10832)
  • Loading branch information
rudiservo authored Dec 22, 2024
commit 7c0e28585843b366864b43b48f92425e2ea17df6
81 changes: 81 additions & 0 deletions .devops/cpu.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
ARG UBUNTU_VERSION=22.04

FROM ubuntu:$UBUNTU_VERSION AS build

RUN apt-get update && \
apt-get install -y build-essential git cmake libcurl4-openssl-dev

WORKDIR /app

COPY . .

RUN cmake -S . -B build -DGGML_BACKEND_DL=ON -DGGML_NATIVE=OFF -DGGML_CPU_ALL_VARIANTS=ON -DLLAMA_CURL=ON -DCMAKE_BUILD_TYPE=Release && \
cmake --build build -j $(nproc)

RUN mkdir -p /app/lib && \
find build -name "*.so" -exec cp {} /app/lib \;

RUN mkdir -p /app/full \
&& cp build/bin/* /app/full \
&& cp *.py /app/full \
&& cp -r gguf-py /app/full \
&& cp -r requirements /app/full \
&& cp requirements.txt /app/full \
&& cp .devops/tools.sh /app/full/tools.sh

## Base image
FROM ubuntu:$UBUNTU_VERSION AS base

RUN apt-get update \
&& apt-get install -y libgomp1 curl\
&& apt autoremove -y \
&& apt clean -y \
&& rm -rf /tmp/* /var/tmp/* \
&& find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete \
&& find /var/cache -type f -delete

COPY --from=build /app/lib/ /app

### Full
FROM base AS full

COPY --from=build /app/full /app

WORKDIR /app

RUN apt-get update \
&& apt-get install -y \
git \
python3 \
python3-pip \
&& pip install --upgrade pip setuptools wheel \
&& pip install -r requirements.txt \
&& apt autoremove -y \
&& apt clean -y \
&& rm -rf /tmp/* /var/tmp/* \
&& find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete \
&& find /var/cache -type f -delete

ENTRYPOINT ["/app/tools.sh"]

### Light, CLI only
FROM base AS light

COPY --from=build /app/full/llama-cli /app

WORKDIR /app

ENTRYPOINT [ "/app/llama-cli" ]

### Server, Server only
FROM base AS server

ENV LLAMA_ARG_HOST=0.0.0.0

COPY --from=build /app/full/llama-server /app

WORKDIR /app

HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ]

ENTRYPOINT [ "/app/llama-server" ]
94 changes: 94 additions & 0 deletions .devops/cuda.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
ARG UBUNTU_VERSION=22.04
# This needs to generally match the container host's environment.
ARG CUDA_VERSION=12.6.0
# Target the CUDA build image
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

# CUDA architecture to build for (defaults to all supported archs)
ARG CUDA_DOCKER_ARCH=default

RUN apt-get update && \
apt-get install -y build-essential cmake python3 python3-pip git libcurl4-openssl-dev libgomp1

WORKDIR /app

COPY . .

RUN if [ "${CUDA_DOCKER_ARCH}" != "default" ]; then \
export CMAKE_ARGS="-DCMAKE_CUDA_ARCHITECTURES=${CUDA_DOCKER_ARCH}"; \
fi && \
cmake -B build -DGGML_NATIVE=OFF -DGGML_CUDA=ON -DLLAMA_CURL=ON ${CMAKE_ARGS} -DCMAKE_EXE_LINKER_FLAGS=-Wl,--allow-shlib-undefined . && \
cmake --build build --config Release -j$(nproc)

RUN mkdir -p /app/lib && \
find build -name "*.so" -exec cp {} /app/lib \;

RUN mkdir -p /app/full \
&& cp build/bin/* /app/full \
&& cp *.py /app/full \
&& cp -r gguf-py /app/full \
&& cp -r requirements /app/full \
&& cp requirements.txt /app/full \
&& cp .devops/tools.sh /app/full/tools.sh

## Base image
FROM ${BASE_CUDA_RUN_CONTAINER} AS base

RUN apt-get update \
&& apt-get install -y libgomp1 curl\
&& apt autoremove -y \
&& apt clean -y \
&& rm -rf /tmp/* /var/tmp/* \
&& find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete \
&& find /var/cache -type f -delete

COPY --from=build /app/lib/ /app

### Full
FROM base AS full

COPY --from=build /app/full /app

WORKDIR /app

RUN apt-get update \
&& apt-get install -y \
git \
python3 \
python3-pip \
&& pip install --upgrade pip setuptools wheel \
&& pip install -r requirements.txt \
&& apt autoremove -y \
&& apt clean -y \
&& rm -rf /tmp/* /var/tmp/* \
&& find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete \
&& find /var/cache -type f -delete


ENTRYPOINT ["/app/tools.sh"]

### Light, CLI only
FROM base AS light

COPY --from=build /app/full/llama-cli /app

WORKDIR /app

ENTRYPOINT [ "/app/llama-cli" ]

### Server, Server only
FROM base AS server

ENV LLAMA_ARG_HOST=0.0.0.0

COPY --from=build /app/full/llama-server /app

WORKDIR /app

HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ]

ENTRYPOINT [ "/app/llama-server" ]
33 changes: 0 additions & 33 deletions .devops/full-cuda.Dockerfile

This file was deleted.

33 changes: 0 additions & 33 deletions .devops/full-musa.Dockerfile

This file was deleted.

50 changes: 0 additions & 50 deletions .devops/full-rocm.Dockerfile

This file was deleted.

38 changes: 0 additions & 38 deletions .devops/full.Dockerfile

This file was deleted.

Loading
Loading