File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -17,12 +17,10 @@ FROM quay.io/projectquay/golang:1.24 AS builder
1717ARG TARGETOS
1818ARG TARGETARCH
1919
20- ENV GOPROXY=https://goproxy.io,direct
21-
2220WORKDIR /workspace
2321
2422USER root
25- RUN dnf install -y gcc-c++ libstdc++ libstdc++-devel && dnf clean all
23+ RUN dnf install -y gcc-c++ libstdc++ libstdc++-devel clang && dnf clean all
2624
2725# Copy the Go Modules manifests
2826COPY go.mod go.mod
@@ -35,6 +33,11 @@ RUN go mod download
3533COPY examples/kv-cache-index/main.go cmd/cmd.go
3634COPY . .
3735
36+ # HuggingFace tokenizer bindings
37+ RUN mkdir -p lib
38+ RUN curl -L https://github.com/daulet/tokenizers/releases/download/v1.20.2/libtokenizers.${TARGETOS}-${TARGETARCH}.tar.gz | tar -xz -C lib
39+ RUN ranlib lib/*.a
40+
3841# Build
3942# the GOARCH has not a default value to allow the binary be built according to the host where the command
4043# was called. For example, if we call make image-build in a local env which has the Apple Silicon M1 SO
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ TARGETOS ?= $(shell go env GOOS)
1212TARGETARCH ?= $(shell go env GOARCH)
1313
1414TOOLS_DIR := $(shell pwd) /hack/tools
15- CONTAINER_TOOL := $(shell command -v docker >/dev/null 2>&1 && echo docker || command -v podman >/dev/null 2>&1 && echo podman || echo "")
15+ CONTAINER_TOOL := $(shell { command -v docker >/dev/null 2>&1 && echo docker; } || { command -v podman >/dev/null 2>&1 && echo podman; } || echo "")
1616BUILDER := $(shell command -v buildah >/dev/null 2>&1 && echo buildah || echo $(CONTAINER_TOOL ) )
1717
1818# go source files
@@ -38,8 +38,6 @@ $(TOKENIZER_LIB):
3838 curl -L https://github.com/daulet/tokenizers/releases/download/$(TOKENIZER_RELEASE ) /libtokenizers.$(TARGETOS ) -$(TARGETARCH ) .tar.gz | tar -xz -C lib
3939 ranlib lib/* .a
4040
41-
42-
4341# #@ Precommit code checks --
4442.PHONY : precommit lint tidy-go copr-fix
4543precommit : tidy-go lint copr-fix
You can’t perform that action at this time.
0 commit comments