Skip to content

Commit fec714f

Browse files
committed
fix dockerfile
Signed-off-by: Maroon Ayoub <[email protected]>
1 parent ca1fefe commit fec714f

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@ FROM quay.io/projectquay/golang:1.24 AS builder
1717
ARG TARGETOS
1818
ARG TARGETARCH
1919

20-
ENV GOPROXY=https://goproxy.io,direct
21-
2220
WORKDIR /workspace
2321

2422
USER 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
2826
COPY go.mod go.mod
@@ -35,6 +33,11 @@ RUN go mod download
3533
COPY examples/kv-cache-index/main.go cmd/cmd.go
3634
COPY . .
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

Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ TARGETOS ?= $(shell go env GOOS)
1212
TARGETARCH ?= $(shell go env GOARCH)
1313

1414
TOOLS_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 "")
1616
BUILDER := $(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
4543
precommit: tidy-go lint copr-fix

0 commit comments

Comments
 (0)