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

RHOAIENG-22439: fix(manifests/rstudio): dismantle the broken RStudio BuildConfig chain and build the image directly #993

Merged

Conversation

jiridanek
Copy link
Member

@jiridanek jiridanek commented Mar 27, 2025

https://issues.redhat.com/browse/RHOAIENG-22439

Description

The way it was, the second (dependent) build would always fail on

[3/3] STEP 33/37: RUN echo "Installing softwares and packages" && micropipenv install && rm -f ./Pipfile.lock && chmod -R g+w /opt/app-root/lib/python3.11/site-packages && fix-permissions /opt/app-root -P
Installing softwares and packages
/bin/sh: line 1: micropipenv: command not found
error: build error: building at STEP "RUN echo "Installing softwares and packages" && micropipenv install && rm -f ./Pipfile.lock && chmod -R g+w /opt/app-root/lib/python3.11/site-packages && fix-permissions /opt/app-root -P": while running runtime: exit status 127

This is because both BuildConfigs were building the same Dockerfile.cuda (that's obviously wasteful) and the Dockerfile was not idempotent (and still is not).

How Has This Been Tested?

    workbenches:
      devFlags:
        manifests:
          - contextDir: manifests
            sourcePath: ''
            uri: 'https://github.com/jiridanek/notebooks/archive/jd_sync_rhds_main_again.tar.gz'
      managementState: Managed

Merge criteria:

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

Sorry, something went wrong.

…BuildConfig chain and build the image directly

The way it was, the second (dependent) build would always fail on

```
[3/3] STEP 33/37: RUN echo "Installing softwares and packages" && micropipenv install && rm -f ./Pipfile.lock && chmod -R g+w /opt/app-root/lib/python3.11/site-packages && fix-permissions /opt/app-root -P
Installing softwares and packages
/bin/sh: line 1: micropipenv: command not found
error: build error: building at STEP "RUN echo "Installing softwares and packages" && micropipenv install && rm -f ./Pipfile.lock && chmod -R g+w /opt/app-root/lib/python3.11/site-packages && fix-permissions /opt/app-root -P": while running runtime: exit status 127
```

This is because both BuildConfigs were building the same `Dockerfile.cuda` (that's obviously wasteful) and the Dockerfile was not idempotent (and still is not).
@openshift-ci openshift-ci bot requested review from atheo89 and harshad16 March 27, 2025 16:36
@openshift-ci openshift-ci bot added the size/m label Mar 27, 2025
@jstourac
Copy link
Member

/lgtm

we should test it in a living cluster first, though

@jiridanek
Copy link
Member Author

jiridanek commented Mar 28, 2025

Using this branch in dev flags, the buildconfigs did not get created (which is correct given this is odh branch), so I created a rhds branch where I cherrypicked the commit from this PR.

I saw that two buildconfigs got created

Screenshot 2025-03-28 at 5 06 06 PM

and I built them and started nvidia-smi on the cuda workbench

Screenshot 2025-03-28 at 5 42 06 PM

@jstourac
Copy link
Member

Awesome, thanks for testing! The build passed just fine too?

@jiridanek
Copy link
Member Author

/approve

Copy link
Contributor

openshift-ci bot commented Mar 28, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jiridanek

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit cb5dc04 into opendatahub-io:main Mar 28, 2025
10 checks passed
@jiridanek jiridanek deleted the jd_rstudio_build_config branch March 28, 2025 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants