|
1 | 1 | ARG BUILDER_IMAGE=brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.23
|
2 |
| -ARG BASE_IMAGE=registry.redhat.io/rhel9-4-els/rhel:9.4 |
3 |
| - |
| 2 | +ARG BASE_IMAGE=registry.redhat.io/rhel9-4-els/rhel-minimal:9.4 |
4 | 3 |
|
5 | 4 | # Build the manager binary
|
6 | 5 | FROM ${BUILDER_IMAGE} AS builder
|
7 |
| -FROM --platform=${BUILDPLATFORM} ${BUILDER_IMAGE} as builder |
8 | 6 |
|
9 | 7 | ARG TARGETOS
|
10 | 8 | ARG TARGETARCH
|
| 9 | +ARG TARGETPLATFORM |
| 10 | + |
| 11 | +ENV GOEXPERIMENT=strictfipsruntime |
11 | 12 |
|
12 | 13 | WORKDIR /workspace
|
13 | 14 | COPY . .
|
14 | 15 |
|
15 |
| -# Build |
16 |
| -# the GOARCH has not a default value to allow the binary be built according to the host where the command |
17 |
| -# was called. For example, if we call make docker-build in a local env which has the Apple Silicon M1 SO |
18 |
| -# the docker BUILDPLATFORM arg will be linux/arm64 when for Apple x86 it will be linux/amd64. Therefore, |
19 |
| -# by leaving it empty we can ensure that the container and binary shipped on it will have the same platform. |
20 |
| -RUN CGO_ENABLED=${CGO_ENABLED:-1} GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager cmd/main.go |
| 16 | +RUN CGO_ENABLED=1 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -tags strictfipsruntime -mod=vendor -a -o manager cmd/main.go |
21 | 17 |
|
22 |
| -FROM ${BASE_IMAGE} |
| 18 | +FROM --platform=$TARGETPLATFORM ${BASE_IMAGE} |
23 | 19 | WORKDIR /
|
24 | 20 | COPY --from=builder /workspace/manager .
|
| 21 | +RUN mkdir /licenses |
| 22 | +COPY --from=builder /workspace/LICENSE /licenses/. |
25 | 23 | USER 65532:65532
|
26 | 24 |
|
| 25 | +LABEL com.redhat.component="Leader Worker Set" |
| 26 | +LABEL name="lws" |
| 27 | +LABEL release="0.5.1" |
| 28 | +LABEL version="0.5.1" |
| 29 | +LABEL url="https://github.com/openshift/kubernetes-sigs-lws" |
| 30 | +LABEL vendor="Red Hat, Inc." |
| 31 | +LABEL description="LeaderWorkerSet: An API for deploying a group of pods as a unit of replication. \ |
| 32 | + It aims to address common deployment patterns of AI/ML inference workloads, \ |
| 33 | + especially multi-host inference workloads where the LLM will be sharded \ |
| 34 | + and run across multiple devices on multiple nodes." |
| 35 | +LABEL io.k8s.description="LeaderWorkerSet: An API for deploying a group of pods as a unit of replication. \ |
| 36 | + It aims to address common deployment patterns of AI/ML inference workloads, \ |
| 37 | + especially multi-host inference workloads where the LLM will be sharded \ |
| 38 | + and run across multiple devices on multiple nodes." |
| 39 | +LABEL summary="LeaderWorkerSet: An API for deploying a group of pods as a unit of replication. \ |
| 40 | + It aims to address common deployment patterns of AI/ML inference workloads, \ |
| 41 | + especially multi-host inference workloads where the LLM will be sharded \ |
| 42 | + and run across multiple devices on multiple nodes." |
| 43 | +LABEL io.k8s.display-name="Leader Worker Set" |
| 44 | +LABEL io.openshift.tags="openshift,operator,leaderworkerset,lws" |
| 45 | + |
27 | 46 | ENTRYPOINT ["/manager"]
|
0 commit comments