Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Dockerfile.konflux and rpm files for 2.13 #172

Merged
merged 5 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions backend/Dockerfile.konflux.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Copyright 2021 IBM Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM registry.redhat.io/ubi8/go-toolset:1.21@sha256:742ae6ec1aef3e7faae488c47695fb64964d342aefecf52d23bd9d5e6731d0b6 AS builder

## Build args to be used at this step
ARG SOURCE_CODE

USER root

RUN dnf update -y && \
dnf install -y cmake clang openssl


COPY ${SOURCE_CODE}/go.mod ./
COPY ${SOURCE_CODE}/go.sum ./

# Copy the source
COPY ${SOURCE_CODE}/ ./

RUN GO111MODULE=on go build -o /bin/apiserver ./backend/src/apiserver/ && \
dnf clean all

FROM registry.redhat.io/ubi8/ubi-minimal@sha256:cf095e5668919ba1b4ace3888107684ad9d587b1830d3eb56973e6a54f456e67

WORKDIR /bin

COPY --from=builder /opt/app-root/src/backend/src/apiserver/config/ /config
COPY --from=builder /bin/apiserver /bin/apiserver

RUN chmod +x /bin/apiserver

USER root

# Adding CA certificate so API server can download pipeline through URL and wget is used for liveness/readiness probe command
RUN microdnf install -y ca-certificates wget

USER 1001

# Expose apiserver port
EXPOSE 8888

# Start the apiserver
CMD /bin/apiserver --config=/config --sampleconfig=/config/sample_config.json -logtostderr=true

LABEL com.redhat.component="odh-ml-pipelines-api-server-v2-container" \
name="managed-open-data-hub/odh-ml-pipelines-api-server-v2-rhel8" \
description="odh-ml-pipelines-api-server-v2" \
summary="odh-ml-pipelines-api-server-v2" \
maintainer="['managed-open-data-hub@redhat.com']" \
io.openshift.expose-services="" \
io.k8s.display-name="odh-ml-pipelines-api-server-v2" \
io.k8s.description="odh-ml-pipelines-api-server-v2" \
com.redhat.license_terms="https://www.redhat.com/licenses/Red_Hat_Standard_EULA_20191108.pdf"
52 changes: 52 additions & 0 deletions backend/Dockerfile.konflux.driver
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Copyright 2021-2024 The Kubeflow Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Build arguments
ARG SOURCE_CODE=.

FROM registry.redhat.io/ubi8/go-toolset:1.21@sha256:742ae6ec1aef3e7faae488c47695fb64964d342aefecf52d23bd9d5e6731d0b6 as builder


## Build args to be used at this step
ARG SOURCE_CODE

## Switch to root as required for some operations
USER root

COPY ${SOURCE_CODE}/go.mod ./
COPY ${SOURCE_CODE}/go.sum ./

# Copy the source
COPY ${SOURCE_CODE}/ ./

RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -tags netgo -ldflags '-extldflags "-static"' -o /bin/driver ./backend/src/v2/cmd/driver/*.go

FROM registry.redhat.io/ubi8/ubi-minimal@sha256:cf095e5668919ba1b4ace3888107684ad9d587b1830d3eb56973e6a54f456e67

WORKDIR /bin

COPY --from=builder /bin/driver /bin/driver
RUN chmod +x /bin/driver

ENTRYPOINT ["/bin/driver"]

LABEL com.redhat.component="odh-ml-pipelines-driver-container" \
name="managed-open-data-hub/odh-ml-pipelines-driver-rhel8" \
description="odh-ml-pipelines-driver" \
summary="odh-ml-pipelines-driver" \
maintainer="['managed-open-data-hub@redhat.com']" \
io.openshift.expose-services="" \
io.k8s.display-name="odh-ml-pipelines-driver" \
io.k8s.description="odh-ml-pipelines-driver" \
com.redhat.license_terms="https://www.redhat.com/licenses/Red_Hat_Standard_EULA_20191108.pdf"
52 changes: 52 additions & 0 deletions backend/Dockerfile.konflux.launcher
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Copyright 2021-2024 The Kubeflow Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Build arguments
ARG SOURCE_CODE=.

# Use ubi8/nodejs-14 as base image
FROM registry.redhat.io/ubi8/go-toolset:1.21@sha256:742ae6ec1aef3e7faae488c47695fb64964d342aefecf52d23bd9d5e6731d0b6 as builder

## Build args to be used at this step
ARG SOURCE_CODE

## Switch to root as required for some operations
USER root

COPY ${SOURCE_CODE}/go.mod ./
COPY ${SOURCE_CODE}/go.sum ./

# Copy the source
COPY ${SOURCE_CODE}/ ./

RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -tags netgo -ldflags '-extldflags "-static"' -o /bin/launcher-v2 ./backend/src/v2/cmd/launcher-v2/*.go

FROM registry.redhat.io/ubi8/ubi-minimal@sha256:cf095e5668919ba1b4ace3888107684ad9d587b1830d3eb56973e6a54f456e67

WORKDIR /bin

COPY --from=builder /bin/launcher-v2 /bin/launcher-v2
RUN chmod +x /bin/launcher-v2

ENTRYPOINT ["/bin/launcher-v2"]

LABEL com.redhat.component="odh-ml-pipelines-launcher-container" \
name="managed-open-data-hub/odh-ml-pipelines-launcher-rhel8" \
description="odh-ml-pipelines-launcher" \
summary="odh-ml-pipelines-launcher" \
maintainer="['managed-open-data-hub@redhat.com']" \
io.openshift.expose-services="" \
io.k8s.display-name="odh-ml-pipelines-launcher" \
io.k8s.description="odh-ml-pipelines-launcher" \
com.redhat.license_terms="https://www.redhat.com/licenses/Red_Hat_Standard_EULA_20191108.pdf"
61 changes: 61 additions & 0 deletions backend/Dockerfile.konflux.persistenceagent
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Copyright 2021 The Kubeflow Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Build arguments
ARG SOURCE_CODE=.

# Use ubi8/go-toolset as base image
FROM registry.redhat.io/ubi8/go-toolset:1.21@sha256:742ae6ec1aef3e7faae488c47695fb64964d342aefecf52d23bd9d5e6731d0b6 as builder

## Build args to be used at this step
ARG SOURCE_CODE

USER root

#RUN dnf install -y bash git openssh gcc

COPY ${SOURCE_CODE}/go.mod ./
COPY ${SOURCE_CODE}/go.sum ./

# Copy the source
COPY ${SOURCE_CODE}/ ./

RUN GO111MODULE=on go build -o /bin/persistence_agent backend/src/agent/persistence/*.go

FROM registry.redhat.io/ubi8/ubi-minimal@sha256:cf095e5668919ba1b4ace3888107684ad9d587b1830d3eb56973e6a54f456e67

WORKDIR /bin

COPY --from=builder /bin/persistence_agent /bin/persistence_agent

ENV NAMESPACE ""

# Set Workflow TTL to 1 day. The way to use a different value for a particular Kubeflow Pipelines deployment is demonstrated in manifests/kustomize/base/pipeline/ml-pipeline-persistenceagent-deployment.yaml
ENV TTL_SECONDS_AFTER_WORKFLOW_FINISH 86400

# NUM_WORKERS indicates now many worker goroutines
ENV NUM_WORKERS 2

CMD persistence_agent --logtostderr=true --namespace=${NAMESPACE} --ttlSecondsAfterWorkflowFinish=${TTL_SECONDS_AFTER_WORKFLOW_FINISH} --numWorker ${NUM_WORKERS}

LABEL com.redhat.component="odh-ml-pipelines-persistenceagent-v2-container" \
name="managed-open-data-hub/odh-ml-pipelines-persistenceagent-v2-rhel8" \
description="odh-ml-pipelines-persistenceagent-v2" \
summary="odh-ml-pipelines-persistenceagent-v2" \
maintainer="['managed-open-data-hub@redhat.com']" \
io.openshift.expose-services="" \
io.k8s.display-name="odh-ml-pipelines-persistenceagent-v2" \
io.k8s.description="odh-ml-pipelines-persistenceagent-v2" \
com.redhat.license_terms="https://www.redhat.com/licenses/Red_Hat_Standard_EULA_20191108.pdf"

56 changes: 56 additions & 0 deletions backend/Dockerfile.konflux.scheduledworkflow
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Copyright 2021 The Kubeflow Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Build arguments
ARG SOURCE_CODE=.

# Use ubi8/go-toolset as base image
FROM registry.redhat.io/ubi8/go-toolset:1.21@sha256:742ae6ec1aef3e7faae488c47695fb64964d342aefecf52d23bd9d5e6731d0b6 as builder

## Build args to be used at this step
ARG SOURCE_CODE

USER root

#RUN dnf install -y bash git openssh gcc

COPY ${SOURCE_CODE}/go.mod ./
COPY ${SOURCE_CODE}/go.sum ./

# Copy the source
COPY ${SOURCE_CODE}/ ./

RUN GO111MODULE=on go build -o /bin/controller backend/src/crd/controller/scheduledworkflow/*.go


FROM registry.redhat.io/ubi8/ubi-minimal@sha256:cf095e5668919ba1b4ace3888107684ad9d587b1830d3eb56973e6a54f456e67

WORKDIR /bin

COPY --from=builder /bin/controller /bin/controller
RUN chmod +x /bin/controller

ENV NAMESPACE ""

CMD /bin/controller --logtostderr=true --namespace=${NAMESPACE}

LABEL com.redhat.component="odh-ml-pipelines-scheduledworkflow-v2-container" \
name="managed-open-data-hub/odh-ml-pipelines-scheduledworkflow-v2-rhel8" \
description="odh-ml-pipelines-scheduledworkflow-v2" \
summary="odh-ml-pipelines-scheduledworkflow-v2" \
maintainer="['managed-open-data-hub@redhat.com']" \
io.openshift.expose-services="" \
io.k8s.display-name="odh-ml-pipelines-scheduledworkflow-v2" \
io.k8s.description="odh-ml-pipelines-scheduledworkflow-v2" \
com.redhat.license_terms="https://www.redhat.com/licenses/Red_Hat_Standard_EULA_20191108.pdf"
15 changes: 15 additions & 0 deletions rpms.in.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
contentOrigin:
repofiles:
- ubi.repo
packages:
- git
- bash
- openssh
- gcc
- tzdata
- cmake
- clang
- openssl
- ca-certificates
- wget

Loading
Loading