Skip to content

Commit

Permalink
Makefile: Add docker targets
Browse files Browse the repository at this point in the history
  • Loading branch information
mudler committed Feb 8, 2024
1 parent c7b7fa3 commit e7f62c2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -532,3 +532,22 @@ backend-assets/grpc/whisper: backend-assets/grpc sources/whisper.cpp/libwhisper.
$(GOCMD) build -ldflags "$(LD_FLAGS)" -tags "$(GO_TAGS)" -o backend-assets/grpc/whisper ./backend/go/transcribe/

grpcs: prepare $(GRPC_BACKENDS)

DOCKER_IMAGE?=local-ai
IMAGE_TYPE?=core
BASE_IMAGE?=ubuntu:22.04

docker:
docker build \
--build-arg BASE_IMAGE=$(BASE_IMAGE) \
--build-arg IMAGE_TYPE=$(IMAGE_TYPE) \
--build-arg GO_TAGS=$(GO_TAGS) \
--build-arg BUILD_TYPE=$(BUILD_TYPE) \
-t $(DOCKER_IMAGE) .

docker-image-intel:
docker build \
--build-arg BASE_IMAGE=intel/oneapi-basekit:2024.0.1-devel-ubuntu22.04 \
--build-arg IMAGE_TYPE=$(IMAGE_TYPE) \
--build-arg GO_TAGS="none" \
--build-arg BUILD_TYPE=sycl_f16 -t $(DOCKER_IMAGE) .
4 changes: 0 additions & 4 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ if [ -n "$EXTRA_BACKENDS" ]; then
done
fi

if [ -e "/opt/intel/oneapi/setvars.sh" ]; then
source /opt/intel/oneapi/setvars.sh
fi

if [ "$REBUILD" != "false" ]; then
rm -rf ./local-ai
make build -j${BUILD_PARALLELISM:-1}
Expand Down

0 comments on commit e7f62c2

Please sign in to comment.