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

Review Dockerfile for building odh-ml-pipelines-persistenceagent-v2 in konflux #98

Merged
merged 2 commits into from
Oct 16, 2024
Merged
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
62 changes: 62 additions & 0 deletions backend/Dockerfile.konflux.persistenceagent
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# 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@sha256:4ec05fd5b355106cc0d990021a05b71bbfb9231e4f5bdc0c5316515edf6a1c96 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:7583ca0ea52001562bd81a961da3f75222209e6192e4e413ee226cff97dbd48c

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="['[email protected]']" \
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"


Loading