mirror of
https://github.com/ravenscroftj/turbopilot.git
synced 2024-10-01 01:06:01 -04:00
Compare commits
16 Commits
2abdcabf02
...
77cde95cb9
Author | SHA1 | Date | |
---|---|---|---|
|
77cde95cb9 | ||
|
bea7ebdb34 | ||
|
812bbea9d7 | ||
|
08e8834390 | ||
|
25680e64d8 | ||
|
dca25d8456 | ||
|
1f6f84a783 | ||
|
0183b30502 | ||
|
b465eae818 | ||
|
e8adff5339 | ||
|
f12dacaa15 | ||
|
0b0b914f92 | ||
|
b21dd0799d | ||
|
c73c196364 | ||
|
30834e3121 | ||
|
39c3182a3a |
1
.github/workflows/build-commit.yml
vendored
1
.github/workflows/build-commit.yml
vendored
@ -25,7 +25,6 @@ jobs:
|
||||
- name: Dependencies
|
||||
id: depends
|
||||
run: |
|
||||
brew update
|
||||
brew install cmake boost asio
|
||||
- name: Build
|
||||
id: make_build
|
||||
|
80
.github/workflows/docker-image.yml
vendored
80
.github/workflows/docker-image.yml
vendored
@ -16,18 +16,52 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
- {tag: "", dockerfile: "./Dockerfile.default", platforms: "linux/amd64,linux/arm64", build_args: [] }
|
||||
- {
|
||||
tag: "openblas",
|
||||
dockerfile: "./Dockerfile.default",
|
||||
platforms: "linux/amd64,linux/arm64",
|
||||
build_args: [
|
||||
"EXTRA_DEPS=libopenblas-dev",
|
||||
"CMAKE_ARGS=\"-DGGML_OPENBLAS=On\""
|
||||
]
|
||||
}
|
||||
- {tag: "-cuda11", dockerfile: "./Dockerfile.cuda11", platforms: "linux/amd64", build_args: [] }
|
||||
- {tag: "-cuda12", dockerfile: "./Dockerfile.cuda12", platforms: "linux/amd64", build_args: [] }
|
||||
- tag:
|
||||
dockerfile: ./Dockerfile.default
|
||||
platforms: linux/amd64,linux/arm64
|
||||
build_base: ubuntu:22.04
|
||||
runtime_base: ubuntu:22.04
|
||||
|
||||
|
||||
- tag: -openblas
|
||||
dockerfile: ./Dockerfile.default
|
||||
platforms: linux/amd64,linux/arm64
|
||||
build_base: ubuntu:22.04
|
||||
runtime_base: ubuntu:22.04
|
||||
extra_deps: libopenblas-dev
|
||||
cmake_args: -DGGML_OPENBLAS=On
|
||||
|
||||
|
||||
- tag: -cuda11-7
|
||||
dockerfile: ./Dockerfile.default
|
||||
platforms: linux/amd64
|
||||
build_base: nvidia/cuda:11.7.1-devel-ubuntu22.04
|
||||
runtime_base: nvidia/cuda:11.7.1-cudnn8-runtime-ubuntu22.04
|
||||
cmake_args: -DGGML_CUBLAS=ON -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc
|
||||
|
||||
- tag: -cuda12-0
|
||||
dockerfile: ./Dockerfile.default
|
||||
platforms: linux/amd64
|
||||
build_base: nvidia/cuda:12.0.0-devel-ubuntu22.04
|
||||
runtime_base: nvidia/cuda:12.0.0-runtime-ubuntu22.04
|
||||
cmake_args: -DGGML_CUBLAS=ON -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc
|
||||
|
||||
- tag: -cuda12-2
|
||||
dockerfile: ./Dockerfile.default
|
||||
platforms: linux/amd64
|
||||
build_base: nvidia/cuda:12.2.0-devel-ubuntu22.04
|
||||
runtime_base: nvidia/cuda:12.2.0-runtime-ubuntu22.04
|
||||
cmake_args: -DGGML_CUBLAS=ON -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc
|
||||
|
||||
- tag: -clblast
|
||||
dockerfile: ./Dockerfile.default
|
||||
platforms: linux/amd64
|
||||
build_base: ubuntu:22.04
|
||||
runtime_base: ubuntu:22.04
|
||||
runtime_deps: libclblast1
|
||||
extra_deps: libclblast-dev
|
||||
cmake_args: -DGGML_CLBLAST=On
|
||||
|
||||
|
||||
steps:
|
||||
|
||||
@ -54,7 +88,7 @@ jobs:
|
||||
password: ${{ secrets.GH_TOKEN }}
|
||||
|
||||
- name: Build and push incremental
|
||||
uses: docker/build-push-action@v4
|
||||
uses: docker/build-push-action@v4.1.1
|
||||
if: (!startsWith(github.ref, 'refs/tags/'))
|
||||
with:
|
||||
file: ${{matrix.config.dockerfile}}
|
||||
@ -62,8 +96,12 @@ jobs:
|
||||
tags: ghcr.io/ravenscroftj/turbopilot:nightly${{matrix.config.tag}}-${{ github.sha }}
|
||||
context: ${{github.workspace}}
|
||||
platforms: ${{matrix.config.platforms}}
|
||||
build-args: ${{matrix.config.build_args}}
|
||||
|
||||
build-args: |
|
||||
EXTRA_DEPS=${{matrix.config.extra_deps}}
|
||||
CMAKE_ARGS=${{matrix.config.cmake_args}}
|
||||
BUILD_BASE=${{matrix.config.build_base}}
|
||||
RUNTIME_BASE=${{matrix.config.runtime_base}}
|
||||
RUNTIME_DEPS=${{matrix.config.runtime_deps}}
|
||||
|
||||
|
||||
- name: Build and push release (Main Latest Build)
|
||||
@ -75,7 +113,11 @@ jobs:
|
||||
tags: ghcr.io/ravenscroftj/turbopilot:${{ github.ref_name }}, ghcr.io/ravenscroftj/turbopilot:latest
|
||||
context: ${{github.workspace}}
|
||||
platforms: ${{matrix.config.platforms}}
|
||||
build-args: ${{matrix.config.build_args}}
|
||||
build-args: |
|
||||
EXTRA_DEPS="${{matrix.config.extra_deps}}"
|
||||
CMAKE_ARGS="${{matrix.config.cmake_args}}"
|
||||
BUILD_BASE="${{matrix.config.build_base}}"
|
||||
RUNTIME_BASE="${{matrix.config.runtime_base}}"
|
||||
|
||||
|
||||
- name: Build and push release (Accelerated Builds)
|
||||
@ -87,4 +129,8 @@ jobs:
|
||||
tags: ghcr.io/ravenscroftj/turbopilot:${{ github.ref_name }}${{matrix.config.tag}}
|
||||
context: ${{github.workspace}}
|
||||
platforms: ${{matrix.config.platforms}}
|
||||
build-args: ${{matrix.config.build_args}}
|
||||
build-args: |
|
||||
EXTRA_DEPS="${{matrix.config.extra_deps}}"
|
||||
CMAKE_ARGS="${{matrix.config.cmake_args}}"
|
||||
BUILD_BASE="${{matrix.config.build_base}}"
|
||||
RUNTIME_BASE="${{matrix.config.runtime_base}}"
|
||||
|
@ -1,39 +0,0 @@
|
||||
FROM nvidia/cuda:11.7.1-devel-ubuntu22.04 AS build
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# inlude kitware apt repo to allow us to grab latest cmake
|
||||
RUN apt-get update && apt-get install ca-certificates gpg wget
|
||||
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
|
||||
RUN echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null
|
||||
|
||||
RUN apt-get update && apt-get install -y build-essential cmake libboost-dev libboost-thread-dev
|
||||
|
||||
|
||||
ADD ./ /turbopilot
|
||||
|
||||
RUN mkdir /turbopilot/build
|
||||
|
||||
WORKDIR /turbopilot/build
|
||||
|
||||
RUN cmake -DGGML_CUBLAS=ON -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc ..
|
||||
RUN make turbopilot
|
||||
|
||||
FROM nvidia/cuda:11.7.1-cudnn8-runtime-ubuntu22.04 AS runtime
|
||||
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=build /turbopilot/build/bin/turbopilot /app/turbopilot
|
||||
|
||||
ENV THREADS=4
|
||||
|
||||
ENV MODEL="/models/codegen-2B-multi-ggml-4bit-quant.bin"
|
||||
|
||||
ENV BATCHSIZE=64
|
||||
|
||||
COPY ./run.sh /app/
|
||||
|
||||
EXPOSE 18080
|
||||
|
||||
CMD /app/run.sh
|
@ -1,37 +0,0 @@
|
||||
FROM nvidia/cuda:12.2.0-devel-ubuntu20.04 AS build
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# inlude kitware apt repo to allow us to grab latest cmake
|
||||
RUN apt-get update && apt-get install ca-certificates gpg wget
|
||||
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
|
||||
RUN echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null
|
||||
|
||||
RUN apt-get update && apt-get install -y build-essential cmake libboost-dev libboost-thread-dev
|
||||
|
||||
ADD ./ /turbopilot
|
||||
|
||||
RUN mkdir /turbopilot/build
|
||||
|
||||
WORKDIR /turbopilot/build
|
||||
|
||||
RUN cmake -DGGML_CUBLAS=ON -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc ..
|
||||
RUN make turbopilot
|
||||
|
||||
FROM nvidia/cuda:12.2.0-runtime-ubuntu20.04 AS runtime
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=build /turbopilot/build/bin/turbopilot /app/turbopilot
|
||||
|
||||
ENV THREADS=4
|
||||
|
||||
ENV MODEL="/models/codegen-2B-multi-ggml-4bit-quant.bin"
|
||||
|
||||
ENV BATCHSIZE=64
|
||||
|
||||
COPY ./run.sh /app/
|
||||
|
||||
EXPOSE 18080
|
||||
|
||||
CMD /app/run.sh
|
@ -1,7 +1,13 @@
|
||||
ARG BUILD_BASE="ubuntu:22.04"
|
||||
ARG RUNTIME_BASE="ubuntu:22.04"
|
||||
|
||||
FROM ${BUILD_BASE} AS build
|
||||
|
||||
ARG EXTRA_DEPS=""
|
||||
ARG CMAKE_ARGS=""
|
||||
|
||||
FROM ubuntu:22.04 AS build
|
||||
RUN echo "CMAKE_ARGS: ${CMAKE_ARGS}"
|
||||
RUN echo "EXTRA_DEPS: ${EXTRA_DEPS}"
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
@ -21,7 +27,11 @@ WORKDIR /turbopilot/build
|
||||
RUN cmake .. ${CMAKE_ARGS}
|
||||
RUN make turbopilot
|
||||
|
||||
FROM ubuntu:22.04 AS runtime
|
||||
FROM ${RUNTIME_BASE} AS runtime
|
||||
|
||||
ARG RUNTIME_DEPS=""
|
||||
|
||||
RUN if [[ -z "${RUNTIME_DEPS}" ]] ; then echo "No runtime libs required" ; else apt-get update && apt-get install -y ${RUNTIME_DEPS} ; fi
|
||||
|
||||
|
||||
WORKDIR /app
|
||||
|
Loading…
Reference in New Issue
Block a user