build nvidia with default dockerfile

This commit is contained in:
James Ravenscroft 2023-08-26 13:08:19 +01:00
parent 30834e3121
commit c73c196364
2 changed files with 38 additions and 5 deletions

View File

@ -18,13 +18,44 @@ jobs:
config:
- {tag: "", dockerfile: "./Dockerfile.default", platforms: "linux/amd64,linux/arm64", build_args: "" }
- {
tag: "openblas",
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: "-cuda11-7",
dockerfile: "./Dockerfile.default",
platforms: "linux/amd64",
build_args: "\
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_args: "\
BUILD_BASE=nvidia/cuda:12.0.0-devel-ubuntu20.04 \
RUNTIME_BASE=nvidia/cuda:12.0.0-runtime-ubuntu20.04 \
CMAKE_ARGS=\"-DGGML_CUBLAS=ON -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc\""
}
- {
tag: "-cuda12-2",
dockerfile: "./Dockerfile.default",
platforms: "linux/amd64",
build_args: "\
BUILD_BASE=nvidia/cuda:12.2.0-devel-ubuntu20.04 \
RUNTIME_BASE=nvidia/cuda:12.2.0-runtime-ubuntu20.04 \
CMAKE_ARGS=\"-DGGML_CUBLAS=ON -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc\""
}
- {
tag: "-clblast",
dockerfile: "./Dockerfile.default",
platforms: "linux/amd64",
build_args: "EXTRA_DEPS=\"libclblast-dev\" CMAKE_ARGS=\"-DGGML_CLBLAST=On\""
}
steps:

View File

@ -1,7 +1,9 @@
ARG EXTRA_DEPS=""
ARG CMAKE_ARGS=""
ARG BUILD_BASE="ubuntu:22.04"
ARG RUNTIME_BASE="ubuntu:22.04"
FROM ubuntu:22.04 AS build
FROM ${BUILD_BASE} AS build
ENV DEBIAN_FRONTEND=noninteractive
@ -21,7 +23,7 @@ WORKDIR /turbopilot/build
RUN cmake .. ${CMAKE_ARGS}
RUN make turbopilot
FROM ubuntu:22.04 AS runtime
FROM ${RUNTIME_BASE} AS runtime
WORKDIR /app