Skip to content

Commit

Permalink
chore: Change feature-server and operator base images to ubi9 (feast-…
Browse files Browse the repository at this point in the history
…dev#4919)

change feature-server and operator base images to ubi9

Signed-off-by: Tommy Hughes <tohughes@redhat.com>
  • Loading branch information
tchughesiv authored Jan 14, 2025
1 parent e01e510 commit 7fad7e3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 46 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ build-feast-operator-docker:
# Dev images

build-feature-server-dev:
docker buildx build --build-arg VERSION=dev \
docker buildx build \
-t feastdev/feature-server:dev \
-f sdk/python/feast/infra/feature_servers/multicloud/Dockerfile.dev --load .

Expand Down
9 changes: 3 additions & 6 deletions infra/feast-operator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Build the manager binary
FROM golang:1.21 AS builder
FROM registry.access.redhat.com/ubi9/go-toolset:1.21 AS builder
ARG TARGETOS
ARG TARGETARCH

WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
Expand All @@ -23,11 +22,9 @@ COPY internal/controller/ internal/controller/
# by leaving it empty we can ensure that the container and binary shipped on it will have the same platform.
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager cmd/main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:nonroot
FROM registry.access.redhat.com/ubi9/ubi-micro:9.5
WORKDIR /
COPY --from=builder /workspace/manager .
COPY --from=builder /opt/app-root/src/manager .
USER 65532:65532

ENTRYPOINT ["/manager"]
19 changes: 4 additions & 15 deletions sdk/python/feast/infra/feature_servers/multicloud/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
FROM python:3.11-slim-bullseye
FROM registry.access.redhat.com/ubi9/python-311:9.5

RUN pip install --no-cache-dir pip --upgrade
RUN pip install --no-cache-dir "feast[aws,gcp,snowflake,redis,go,mysql,postgres,opentelemetry,grpcio,k8s,duckdb,milvus]"


RUN apt update && apt install -y -V ca-certificates lsb-release wget && \
wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb && \
apt install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb && apt update && \
apt install -y \
jq \
libarrow-dev && \
apt remove -y lsb-release wget && \
apt-get clean && rm -rf /var/cache/apt/lists
ARG VERSION
RUN pip install "feast[aws,gcp,snowflake,redis,go,mysql,postgres,opentelemetry,grpcio,k8s,duckdb,milvus]"==${VERSION}

# modify permissions to support running with a random uid
RUN mkdir -m 775 /.cache
RUN chmod g+w $(python3 -c "import feast.ui as _; print(_.__path__)" | tr -d "[']")/build/projects-list.json
RUN chmod g+w $(python -c "import feast.ui as ui; print(ui.__path__)" | tr -d "[']")/build/projects-list.json
33 changes: 9 additions & 24 deletions sdk/python/feast/infra/feature_servers/multicloud/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,28 +1,13 @@
FROM python:3.11-slim-bullseye
FROM registry.access.redhat.com/ubi9/python-311:9.5

RUN pip install --no-cache-dir pip --upgrade
RUN pip install --no-cache-dir pip-tools
COPY --chown=default . ${APP_ROOT}/src
RUN pip install --no-cache-dir pip-tools && \
make install-python-ci-dependencies && \
pip uninstall -y pip-tools

RUN apt update && apt install -y -V ca-certificates lsb-release wget make git curl gcc && \
curl -sL https://deb.nodesource.com/setup_20.x | bash - && \
wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb && \
apt install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb && apt update && \
apt install -y \
jq \
nodejs \
libarrow-dev && \
npm install -g yarn && \
apt remove -y lsb-release wget && \
apt-get clean && rm -rf /var/cache/apt/lists

COPY . /feast
WORKDIR /feast
RUN make install-python-ci-dependencies && pip cache purge
ENV NPM_TOKEN '//registry.npmjs.org/:_authToken'
RUN make build-ui && yarn cache clean

WORKDIR /
RUN npm install -S yarn
ENV PATH ${PATH}:${APP_ROOT}/src/node_modules/yarn/bin
RUN make build-ui && yarn cache clean --all

# modify permissions to support running with a random uid
RUN mkdir -m 775 /.cache
RUN chmod g+w $(python3 -c "import feast.ui as _; print(_.__path__)" | tr -d "[']")/build/projects-list.json
RUN chmod g+w $(python -c "import feast.ui as ui; print(ui.__path__)" | tr -d "[']")/build/projects-list.json

0 comments on commit 7fad7e3

Please sign in to comment.