Skip to content

Commit adb5d83

Browse files
authored
Merge pull request #68 from mutablelogic/djt-0517-build
Updated build testing for MacOS
2 parents f800d23 + 67564b5 commit adb5d83

File tree

4 files changed

+15
-11
lines changed

4 files changed

+15
-11
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ docker: docker-dep submodule
6060
--build-arg OS=${OS} \
6161
--build-arg SOURCE=${BUILD_MODULE} \
6262
--build-arg VERSION=${VERSION} \
63+
--build-arg GGML_CUDA=${GGML_CUDA} \
6364
-f etc/Dockerfile .
6465

6566
# Test whisper bindings
@@ -123,7 +124,7 @@ mkdir:
123124
# go mod tidy
124125
go-tidy: go-dep
125126
@echo Tidy
126-
@go mod tidy
127+
@${GO} mod tidy
127128

128129
# Clean
129130
clean: submodule-clean go-tidy

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,15 @@ There's more information on the API [here](doc/API.md).
7272
If you are building a docker image, you just need make and docker installed:
7373

7474
* `DOCKER_REGISTRY=docker.io/user make docker` - builds a docker container with the
75-
server binary, tagged to a specific registry
75+
server binary for CUDA, tagged to a specific registry
76+
* `OS=linux GGML_CUDA=0 DOCKER_REGISTRY=docker.io/user make docker` - builds a docker container
77+
for Linux, with the server binary without CUDA, tagged to a specific registry
7678

77-
If you want to build the server yourself for your specific combination of hardware (for example,
78-
on MacOS), you can use the `Makefile` in the root directory and have the following dependencies
79-
met:
79+
If you want to build the server without docker, you can use the `Makefile` in the root
80+
directory and have the following dependencies met:
8081

81-
* Go 1.22
82-
* C++ compiler
82+
* Recent version of Go (ie, 1.22+)
83+
* C++ compiler and cmake
8384
* FFmpeg 6.1 libraries (see [here](doc/build.md) for more information)
8485
* For CUDA, you'll need the CUDA toolkit installed including the `nvcc` compiler
8586

etc/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,21 @@ ARG BASE_TAG=1.0.2
22
ARG BASE_DEV_CONTAINER=ghcr.io/mutablelogic/cuda-dev:${BASE_TAG}
33
ARG BASE_RUN_CONTAINER=ghcr.io/mutablelogic/cuda-rt:${BASE_TAG}
44
ARG CUDA_DOCKER_ARCH=all
5-
ARG GO_VERSION=1.22.5
5+
ARG GGML_CUDA=1
6+
ARG GO_VERSION=1.24.3
67
ARG ARCH
78
ARG OS
89

910
# Setup build container
1011
FROM ${BASE_DEV_CONTAINER} AS build
1112
ARG CUDA_DOCKER_ARCH
13+
ARG GGML_CUDA
1214
ARG GO_VERSION
1315
ARG ARCH
1416
ARG OS
1517

1618
RUN apt-get -y update \
17-
&& apt-get -y install software-properties-common curl libgomp1 \
19+
&& apt-get -y install software-properties-common cmake curl libgomp1 \
1820
&& add-apt-repository -y ppa:ubuntuhandbook1/ffmpeg6 \
1921
&& apt-get -y update \
2022
&& apt-get -y install libavformat-dev libavcodec-dev libavdevice-dev libavfilter-dev libavutil-dev libswscale-dev libswresample-dev
@@ -29,7 +31,7 @@ COPY . .
2931

3032
# Make whisper-server
3133
ENV CUDA_DOCKER_ARCH=${CUDA_DOCKER_ARCH}
32-
ENV GGML_CUDA=1
34+
ENV GGML_CUDA=${GGML_CUDA}
3335
RUN make -j$(nproc)
3436

3537
# Setup runtime container

third_party/whisper.cpp

0 commit comments

Comments
 (0)