Skip to content

feat(api): image building process improvement #404

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

Open
wants to merge 78 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
56bf4a0
feat: adjust kaniko job flags
Mar 18, 2025
b4035ef
feat: implement getHashedModelDependenciesUrl
Mar 19, 2025
0a41d34
feat: create unit test for getHashedModelDependenciesUrl
Mar 19, 2025
538e74a
feat: refactor app.Dockerfile to use hashed dependency
Mar 19, 2025
26a6ad3
feat: call getHashedModelDependenciesUrl and pass to kanikojob
Mar 19, 2025
928a33c
chore: artifactService dependency injection
Mar 20, 2025
58e50f5
chore: adjust imagebuilder_test
Mar 20, 2025
37b4d8e
chore: delete unused attribute and reorder code
Mar 20, 2025
0d64d89
chore: fix appcontext_test
Mar 20, 2025
b30d4ff
feat: refactor ensembler job app.Dockerfile
Mar 21, 2025
76d4706
feat: remove python installation process on base Dockerfile, install…
Mar 21, 2025
fa7c302
feat: remove python installation from ensembling job base image
Mar 24, 2025
bf46cea
feat: update Makefile to publish turing pyfunc-ensembler-service to pypi
Mar 25, 2025
ae204cf
chore: add version when publishing pyfunc-ensembler-service package
Mar 25, 2025
6bb664a
chore: test app.Dockerfile changes
Mar 25, 2025
f52d53b
chore: try to create new conda env instead of updating the conda env …
Mar 26, 2025
e74f95c
chore: change turing_dep value for testing
Mar 26, 2025
55b01af
chore: change turing_dep value for testing
Mar 26, 2025
77cc5a1
feat: install turing-sdk via process_conda_env.sh
Mar 26, 2025
66b73c2
chore: change TURING_DEP value
Mar 26, 2025
64dc081
feat: use 1 base image for every python version
Mar 26, 2025
5135e3b
chore: remove BaseImageRefTag
Mar 26, 2025
b678b8d
feat: create rule to build pyfunc-ensembler-job setup.py
Mar 27, 2025
b695c84
feat: adjust app.Dockerfile and base Dockerfile for pyfunc-ensembler-job
Mar 27, 2025
ca23625
chore: add yq installation step on pyfunc-ensembler-job base Dockerfile
Apr 8, 2025
864a033
chore: fix breaking appcontext_test.go
Apr 8, 2025
65f9d3e
chore: refactor line with char > 120
Apr 8, 2025
ddd1b85
chore: remove unittest related to image tag
Apr 8, 2025
2d620f7
chore: fix golangci-lint related issues
Apr 8, 2025
7e0ba5f
chore: fix golangci-lint related issues (2)
Apr 8, 2025
7480267
chore: fix golangci-lint related issue (3)
Apr 8, 2025
56ec882
fix: fix wrong arg name in ensembler job app.Dockerfile
Apr 8, 2025
d1cc242
chore: use pyfunc-ensembler-job package instead of dummy package
Apr 9, 2025
93dae7e
feat: add Publish pyfunc-ensembler-job package step on github CI
Apr 9, 2025
438f646
chore: adjust github ci for testing
Apr 9, 2025
f1b96e7
fix: use importlib.util instead of imp (imp was removed in python 3.12)
Apr 9, 2025
671b7e8
chore: remove TWINE auth from makefile command, use env instead
Apr 9, 2025
60fdba1
chore: adjust pypi related env
Apr 9, 2025
99ba890
feat: add publish pyfunc-ensembler-service package to github CI
Apr 9, 2025
e971d3c
chore: adjust ci rule for testing
Apr 9, 2025
b5cc22d
feat: use importlib.util instead of imp for pyfunc-ensembler-service
Apr 9, 2025
2c0c613
fix: add secret to pyfunc-ensembler-service CI
Apr 9, 2025
6d580cc
chore: remove arg in make build
Apr 9, 2025
fbcedf1
feat: add turing prefix to package name
Apr 9, 2025
19d42d0
chore: revert changes related to CI testing
Apr 9, 2025
4dabb22
feat: remove python-version matrix from CI
Apr 10, 2025
690b589
chore: separate build and publish rule in Makefile
Apr 10, 2025
74fcb5a
feat: use python/ tag to determine pyfunc-ensembler-service and pyfun…
Apr 10, 2025
4b66da3
feat: adjust make setup and make test
Apr 10, 2025
8cd9f07
chore: adjust github workflow for testing
Apr 10, 2025
db6bcad
chore: remove python version requirement
Apr 10, 2025
557c0a3
fix: fix wrong make setup command
Apr 10, 2025
f50fad9
chore: debug git tag
Apr 10, 2025
703bffd
chore: remove -y from vertagen
Apr 10, 2025
65bfde2
chore: trigger ci from python/ tag push
Apr 10, 2025
6c2d3b1
chore: delete Pipfile
Apr 10, 2025
92702c2
chore: bump up numpy version
Apr 10, 2025
da5f434
chore: try to bump python version
Apr 10, 2025
a9c1b97
chore: fix invalid python version
Apr 10, 2025
50dc701
feat: use pipenv for make type-check
Apr 10, 2025
daeb4b5
chore: fix wrong folder name in make test-type
Apr 10, 2025
f62ccea
chore: add types-PyYAML to dev req
Apr 10, 2025
c590d4b
feat: adjust github CI for pyfunc-ensembler-service
Apr 11, 2025
953ec56
feat: only run pyfunc-ensembler-* CI for python/ tag release
Apr 11, 2025
166b0b1
feat: change release-rules for sdk, release if new python/ tag is rel…
Apr 11, 2025
5ac74dc
chore: fix make rule called by pyfunc-ensembler-* workflow, add tags …
Apr 11, 2025
6a81433
fix: change regex to parse tag to dist version
Apr 11, 2025
acb00b6
feat: only run pyfunc-ensembler-* workflow after sdk workflow is succ…
Apr 11, 2025
6480f68
feat: remove other trigger for pyfunc-ensembler-* workflow
Apr 11, 2025
3649ed9
fix: change sdk app name param for vertagen
Apr 11, 2025
69419b6
chore: remove --platform=linux/amd64 from pyfunc-ensembler-job base D…
Apr 11, 2025
17712a3
feat: do pyfunc-ensembler-job unit testing for python 3.8 - 3.10
Apr 25, 2025
44f594a
feat: check error from initArtifactService
Apr 25, 2025
b520dd5
chore: remove BaseImageRef and adjust the unittest
Apr 25, 2025
3df13eb
feat: use artifactService.GetType() instead of artifactServiceType to…
Apr 25, 2025
a0f11e6
chore: reorder install yq command in Dockerfile
Apr 25, 2025
515ce0b
feat: adjust how to get version from version.py
Apr 25, 2025
2ea96b3
feat: remove from requirements.txt
Apr 25, 2025
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
52 changes: 20 additions & 32 deletions .github/workflows/pyfunc-ensembler-job.yaml
Original file line number Diff line number Diff line change
@@ -1,37 +1,19 @@
name: engines/pyfunc-ensembler-job

on:
# Automatically run CI on Release and Pre-Release tags and main branch
# (only if there are changes to relevant paths)
push:
tags:
- "pyfunc-ensembler-job/v[0-9]+.[0-9]+.[0-9]+*"
branches:
- main
paths:
- ".github/workflows/pyfunc-ensembler-job.yaml"
- "engines/pyfunc-ensembler-job/**"
- "sdk/**"

# Automatically run CI on branches, that have active PR opened
pull_request:
branches:
- main
paths:
- ".github/workflows/pyfunc-ensembler-job.yaml"
- "engines/pyfunc-ensembler-job/**"
- "sdk/**"

# To make it possible to trigger e2e CI workflow for any arbitrary git ref
workflow_dispatch:
# The package build by this job requires latest version of sdk,
# so we can only run this workflow after sdk workflow is successfully run
workflow_run:
workflows: ["sdk"]
types:
- completed
Comment on lines +6 to +9
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow this is cool

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I can't test this until the workflow is merged to main tho, hopefully it runs as expected


jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v4

Expand All @@ -40,7 +22,6 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache-dependency-path: |
engines/pyfunc-ensembler-job/env-${{ matrix.python-version }}.yaml
engines/pyfunc-ensembler-job/requirements.txt
engines/pyfunc-ensembler-job/requirements.dev.txt

Expand Down Expand Up @@ -70,7 +51,7 @@ jobs:
- id: release-rules
uses: ./.github/actions/release-rules
with:
prefix: pyfunc-ensembler-job/
prefix: python/

publish:
# Automatically publish release and pre-release artifacts.
Expand All @@ -81,14 +62,12 @@ jobs:
# Dev build can be released either from the 'main' branch or
# by running this workflow manually with `workflow_dispatch` event.
if: >-
contains('release,pre-release', needs.release-rules.outputs.release-type)
(contains('release,pre-release', needs.release-rules.outputs.release-type)
|| ( github.event_name != 'pull_request' )
|| ( github.event.pull_request.head.repo.full_name == github.repository )
|| ( github.event.pull_request.head.repo.full_name == github.repository )) &&
${{ github.event.workflow_run.conclusion == 'success' }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand correctly, github.event.workflow_run refers to the SDK workflow right? If it is, then wouldn't the on.workflow_run.workflows thing you configured at the top of this file already guarantee that the workflow needs to be successful before this entire workflow can even begin running? 🤔 In other words, would ${{ github.event.workflow_run.conclusion == 'success' }} be redundant here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

workflow_run:
    workflows: ["sdk"]
    types:
      - completed

the completed in here doesn't check whether the conclusion of the workflow is success or failure, therefore I need to check the conclusion manually. The example on the documentation suggests that it work like that. Maybe my comment above the workflow_run is confusing

environment: ${{ needs.release-rules.outputs.release-type == 'dev' && 'manual' || '' }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
needs:
- release-rules
- test
Expand All @@ -109,11 +88,20 @@ jobs:
working-directory: engines/pyfunc-ensembler-job
env:
DOCKER_REGISTRY: ghcr.io/${{ github.repository }}
PYTHON_VERSION: ${{ matrix.python-version }}
run: |
set -o pipefail
make build-image | tee output.log
echo "::set-output name=pyfunc-ensembler-job::$(sed -n 's%Building docker image: \(.*\)%\1%p' output.log)"

- name: Publish Pyfunc Ensembler Job Docker Image
run: docker push ${{ steps.build.outputs.pyfunc-ensembler-job }}

- name: Publish pyfunc-ensembler-job package
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
working-directory: engines/pyfunc-ensembler-job
run: |
set -o pipefail
make build-and-publish | tee output.log
echo "pyfunc-ensembler-job=$(sed -n 's%Building docker image: \(.*\)%\1%p' output.log)" >> $GITHUB_OUTPUT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooh, why do we need to store this as a GitHub output?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't remember my reason on doing this haha, maybe because the Build Docker Image job saves the log to the output, I also save this job's log to the output. But if it isn't necessary I can delete this part. And setting the output using ::set-output is deprecated and they ask us to setting it using >> $GITHUB_OUTPUT

58 changes: 22 additions & 36 deletions .github/workflows/pyfunc-ensembler-service.yaml
Original file line number Diff line number Diff line change
@@ -1,46 +1,25 @@
name: engines/pyfunc-ensembler-service

on:
# Automatically run CI on Release and Pre-Release tags and main branch
# (only if there are changes to relevant paths)
push:
tags:
- "pyfunc-ensembler-service/v[0-9]+.[0-9]+.[0-9]+*"
branches:
- main
paths:
- ".github/workflows/pyfunc-ensembler-service.yaml"
- "engines/pyfunc-ensembler-service/**"
- "sdk/**"

# Automatically run CI on branches, that have active PR opened
pull_request:
branches:
- main
paths:
- ".github/workflows/pyfunc-ensembler-service.yaml"
- "engines/pyfunc-ensembler-service/**"
- "sdk/**"

# To make it possible to trigger e2e CI workflow for any arbitrary git ref
workflow_dispatch:
# The package build by this job requires latest version of sdk,
# so we can only run this workflow after sdk workflow is successfully run
workflow_run:
workflows: ["sdk"]
types:
- completed

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v4

- name: Setup Python ${{ matrix.python-version }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: "3.10"
cache-dependency-path: |
engines/pyfunc-ensembler-service/env-${{ matrix.python-version }}.yaml
engines/pyfunc-ensembler-service/requirements.txt
engines/pyfunc-ensembler-service/requirements.dev.txt

Expand All @@ -64,7 +43,7 @@ jobs:
- id: release-rules
uses: ./.github/actions/release-rules
with:
prefix: pyfunc-ensembler-service/
prefix: python/

publish:
# Automatically publish release and pre-release artifacts.
Expand All @@ -75,14 +54,12 @@ jobs:
# Dev build can be released either from the 'main' branch or
# by running this workflow manually with `workflow_dispatch` event.
if: >-
contains('release,pre-release', needs.release-rules.outputs.release-type)
(contains('release,pre-release', needs.release-rules.outputs.release-type)
|| ( github.event_name != 'pull_request' )
|| ( github.event.pull_request.head.repo.full_name == github.repository )
|| ( github.event.pull_request.head.repo.full_name == github.repository )) &&
${{ github.event.workflow_run.conclusion == 'success' }}
environment: ${{ needs.release-rules.outputs.release-type == 'dev' && 'manual' || '' }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
needs:
- release-rules
- test
Expand All @@ -103,11 +80,20 @@ jobs:
working-directory: engines/pyfunc-ensembler-service
env:
DOCKER_REGISTRY: ghcr.io/${{ github.repository }}
PYTHON_VERSION: ${{ matrix.python-version }}
run: |
set -o pipefail
make build-image | tee output.log
echo "::set-output name=pyfunc-ensembler-service-image::$(sed -n 's%Building docker image: \(.*\)%\1%p' output.log)"

- name: Publish Pyfunc Ensembler Service Docker Image
run: docker push ${{ steps.build.outputs.pyfunc-ensembler-service-image }}

- name: Publish pyfunc-ensembler-service package
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
working-directory: engines/pyfunc-ensembler-service
run: |
set -o pipefail
make build-and-publish | tee output.log
echo "pyfunc-ensembler-service=$(sed -n 's%Building docker image: \(.*\)%\1%p' output.log)" >> $GITHUB_OUTPUT
3 changes: 2 additions & 1 deletion .github/workflows/sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
push:
tags:
- "sdk/v[0-9]+.[0-9]+.[0-9]+*"
- "python/v[0-9]+.[0-9]+.[0-9]+*"
branches:
- main
paths:
Expand Down Expand Up @@ -66,7 +67,7 @@ jobs:
- id: release-rules
uses: ./.github/actions/release-rules
with:
prefix: sdk/
prefix: python/

publish:
# Automatically publish release and pre-release artifacts.
Expand Down
23 changes: 21 additions & 2 deletions api/turing/api/appcontext.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (

mlpcluster "github.com/caraml-dev/mlp/api/pkg/cluster"

"github.com/caraml-dev/mlp/api/pkg/artifact"
batchensembling "github.com/caraml-dev/turing/api/turing/batch/ensembling"
batchrunner "github.com/caraml-dev/turing/api/turing/batch/runner"
"github.com/caraml-dev/turing/api/turing/cluster"
Expand Down Expand Up @@ -94,6 +95,11 @@ func NewAppContext(
// Init ensemblers service
ensemblersService := service.NewEnsemblersService(db)

artifactService, err := initArtifactService(cfg)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh wait, it this expected that the error isn't being handled? 😮

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this 🤝, updated

if err != nil {
return nil, errors.Wrapf(err, "Failed initializing artifact service")
}

if cfg.BatchEnsemblingConfig.Enabled {
if cfg.BatchEnsemblingConfig.JobConfig == nil {
return nil, errors.Wrapf(err, "BatchEnsemblingConfig.JobConfig was not set")
Expand Down Expand Up @@ -124,7 +130,7 @@ func NewAppContext(
ensemblingImageBuilder, err = imagebuilder.NewEnsemblerJobImageBuilder(
imageBuildingController,
*cfg.BatchEnsemblingConfig.ImageBuildingConfig,
cfg.MlflowConfig.ArtifactServiceType,
artifactService,
)
if err != nil {
return nil, errors.Wrapf(err, "Failed initializing ensembling image builder")
Expand Down Expand Up @@ -159,7 +165,7 @@ func NewAppContext(
ensemblerServiceImageBuilder, err := imagebuilder.NewEnsemblerServiceImageBuilder(
clusterControllers[cfg.EnsemblerServiceBuilderConfig.ClusterName],
*cfg.EnsemblerServiceBuilderConfig.ImageBuildingConfig,
cfg.MlflowConfig.ArtifactServiceType,
artifactService,
)
if err != nil {
return nil, errors.Wrapf(err, "Failed initializing ensembler service builder")
Expand Down Expand Up @@ -236,3 +242,16 @@ func buildKubeconfigStore(mlpSvc service.MLPService, cfg *config.Config) (map[st
}
return k8sConfigStore, nil
}

func initArtifactService(cfg *config.Config) (artifact.Service, error) {
if cfg.MlflowConfig.ArtifactServiceType == "gcs" {
return artifact.NewGcsArtifactClient()
}
if cfg.MlflowConfig.ArtifactServiceType == "s3" {
return artifact.NewS3ArtifactClient()
}
if cfg.MlflowConfig.ArtifactServiceType == "nop" {
return artifact.NewNopArtifactClient(), nil
}
return nil, fmt.Errorf("invalid artifact service type %s", cfg.MlflowConfig.ArtifactServiceType)
}
19 changes: 9 additions & 10 deletions api/turing/api/appcontext_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,8 @@ func TestNewAppContext(t *testing.T) {
MaxRetryCount: 3,
},
ImageBuildingConfig: &config.ImageBuildingConfig{
DestinationRegistry: "ghcr.io",
BaseImageRef: map[string]string{
"3.7.*": "ghcr.io/caraml-dev/turing/pyfunc-ensembler-job:0.0.0-build.1-98b071d",
},
DestinationRegistry: "ghcr.io",
BaseImage: "ghcr.io/caraml-dev/turing/pyfunc-ensembler-job:0.0.0-build.1-98b071d",
BuildNamespace: "default",
BuildTimeoutDuration: 10 * time.Minute,
KanikoConfig: config.KanikoConfig{
Expand All @@ -97,10 +95,8 @@ func TestNewAppContext(t *testing.T) {
EnsemblerServiceBuilderConfig: config.EnsemblerServiceBuilderConfig{
ClusterName: defaultEnvironment,
ImageBuildingConfig: &config.ImageBuildingConfig{
DestinationRegistry: "ghcr.io",
BaseImageRef: map[string]string{
"3.7.*": "ghcr.io/caraml-dev/turing/pyfunc-ensembler-service:0.0.0-build.1-98b071d",
},
DestinationRegistry: "ghcr.io",
BaseImage: "ghcr.io/caraml-dev/turing/pyfunc-ensembler-service:0.0.0-build.1-98b071d",
BuildNamespace: "default",
BuildTimeoutDuration: 10 * time.Minute,
KanikoConfig: config.KanikoConfig{
Expand Down Expand Up @@ -306,10 +302,13 @@ func TestNewAppContext(t *testing.T) {
alertService, err := service.NewGitlabOpsAlertService(nil, *testCfg.AlertConfig)
assert.NoError(t, err)

artifactService, err := initArtifactService(testCfg)
assert.NoError(t, err)

ensemblingImageBuilder, err := imagebuilder.NewEnsemblerJobImageBuilder(
nil,
*testCfg.BatchEnsemblingConfig.ImageBuildingConfig,
testCfg.MlflowConfig.ArtifactServiceType,
artifactService,
)
assert.Nil(t, err)

Expand Down Expand Up @@ -343,7 +342,7 @@ func TestNewAppContext(t *testing.T) {
ensemblerImageBuilder, err := imagebuilder.NewEnsemblerServiceImageBuilder(
nil,
*testCfg.EnsemblerServiceBuilderConfig.ImageBuildingConfig,
testCfg.MlflowConfig.ArtifactServiceType,
artifactService,
)

assert.NoError(t, err)
Expand Down
23 changes: 1 addition & 22 deletions api/turing/batch/ensembling/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,28 +287,9 @@ func (r *ensemblingJobRunner) processOneEnsemblingJob(ensemblingJob *models.Ense
return
}

// Get ensembler
ensembler, err := r.ensemblersService.FindByID(
ensemblingJob.EnsemblerID,
service.EnsemblersFindByIDOptions{ProjectID: &ensemblingJob.ProjectID},
)
if err != nil {
r.saveStatusOrTerminate(ensemblingJob, mlpProject, models.JobPending, err.Error(), true)
return
}

// Get base image tag
var baseImageTag string
if pyfuncEnsembler, ok := ensembler.(*models.PyFuncEnsembler); ok {
baseImageTag = pyfuncEnsembler.PythonVersion
} else {
r.saveStatusOrTerminate(ensemblingJob, mlpProject, models.JobPending, err.Error(), true)
return
}

// Build Image
labels := r.buildLabels(ensemblingJob, mlpProject)
imageRef, imageBuildErr := r.buildImage(ensemblingJob, mlpProject, labels, baseImageTag)
imageRef, imageBuildErr := r.buildImage(ensemblingJob, mlpProject, labels)

if imageBuildErr != nil {
// Here unfortunately we have to wait till the image building process has
Expand Down Expand Up @@ -433,7 +414,6 @@ func (r *ensemblingJobRunner) buildImage(
ensemblingJob *models.EnsemblingJob,
mlpProject *mlp.Project,
buildLabels map[string]string,
baseImageTag string,
) (string, error) {
request := imagebuilder.BuildImageRequest{
ProjectName: mlpProject.Name,
Expand All @@ -443,7 +423,6 @@ func (r *ensemblingJobRunner) buildImage(
ArtifactURI: *ensemblingJob.InfraConfig.ArtifactUri,
BuildLabels: buildLabels,
EnsemblerFolder: service.EnsemblerFolder,
BaseImageRefTag: baseImageTag,
}
return r.imageBuilder.BuildImage(request)
}
6 changes: 2 additions & 4 deletions api/turing/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,6 @@ type ImageBuildingConfig struct {
BuildTimeoutDuration time.Duration `validate:"required"`
// DestinationRegistry is the registry of the newly built ensembler image.
DestinationRegistry string `validate:"required"`
// BaseImageRef is the image name of the base ensembler image built from the
// engines/pyfunc-ensembler-*/Dockerfile. It's a map of image names, per
// minor python version supported by the SDK.
BaseImageRef map[string]string `validate:"required"`
// KanikoConfig contains the configuration related to the kaniko executor image builder.
KanikoConfig KanikoConfig `validate:"required"`
// TolerationName allow the scheduler to schedule image building jobs with the matching name
Expand All @@ -181,6 +177,8 @@ type ImageBuildingConfig struct {
NodeSelector map[string]string
// Value for cluster-autoscaler.kubernetes.io/safe-to-evict annotation
SafeToEvict bool
// BaseImageRef is the image name of the base ensembler image built from the engines/pyfunc-ensembler-*/Dockerfile
BaseImage string
Comment on lines +180 to +181
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can now remove the BaseImageRef field right? 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct, thanks for catching this. Updated

}

// Resource contains the Kubernetes resource request and limits
Expand Down
Loading
Loading