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

Fix RamaLama container image build #446

Merged
merged 1 commit into from
Nov 12, 2024
Merged

Fix RamaLama container image build #446

merged 1 commit into from
Nov 12, 2024

Conversation

ericcurtin
Copy link
Collaborator

@ericcurtin ericcurtin commented Nov 12, 2024

Error:
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
Problem: conflicting requests

  • nothing provides libLLVM-17.so()(64bit) needed by mesa-vulkan-drivers-23.3.3-102.el9.x86_64 from copr:copr.fedorainfracloud.org:slp:mesa-krunkit
  • nothing provides libLLVM-17.so(LLVM_17)(64bit) needed by mesa-vulkan-drivers-23.3.3-102.el9.x86_64 from copr:copr.fedorainfracloud.org:slp:mesa-krunkit
    Error: building at STEP "RUN chmod +x /scripts/*.sh && /scripts/build_llama_and_whisper.sh "ramalama" "$LLAMA_CPP_SHA" "$WHISPER_CPP_SHA" "/usr" "-DGGML_KOMPUTE=1"": while running runtime: exit status 1
    make: *** [Makefile:78: build] Error 1

Summary by Sourcery

Bug Fixes:

  • Resolve package installation order to fix build errors in the RamaLama container image.

Error:
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
 Problem: conflicting requests
  - nothing provides libLLVM-17.so()(64bit) needed by mesa-vulkan-drivers-23.3.3-102.el9.x86_64 from copr:copr.fedorainfracloud.org:slp:mesa-krunkit
  - nothing provides libLLVM-17.so(LLVM_17)(64bit) needed by mesa-vulkan-drivers-23.3.3-102.el9.x86_64 from copr:copr.fedorainfracloud.org:slp:mesa-krunkit
Error: building at STEP "RUN chmod +x /scripts/*.sh &&     /scripts/build_llama_and_whisper.sh "ramalama" "$LLAMA_CPP_SHA"       "$WHISPER_CPP_SHA" "/usr" "-DGGML_KOMPUTE=1"": while running runtime: exit status 1
make: *** [Makefile:78: build] Error 1

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
Copy link
Contributor

sourcery-ai bot commented Nov 12, 2024

Reviewer's Guide by Sourcery

This PR fixes the RamaLama container image build by reordering package installation dependencies. The core issue was related to package dependency resolution where mesa-vulkan-drivers required LLVM-17 libraries that weren't available at the time of installation.

Sequence diagram for the package installation process

sequenceDiagram
    participant Script
    participant DNF
    participant COPR
    participant CentOSMirror
    participant RPM

    Script->>DNF: Enable COPR repo slp/mesa-krunkit
    DNF->>COPR: Request repo access
    COPR-->>DNF: Repo enabled

    Script->>DNF: Add CentOS Stream repo
    DNF->>CentOSMirror: Request repo access
    CentOSMirror-->>DNF: Repo added

    Script->>RPM: Import CentOS GPG key
    RPM-->>Script: Key imported

    Script->>DNF: Install packages
    DNF->>COPR: Resolve dependencies
    DNF->>CentOSMirror: Resolve dependencies
    DNF-->>Script: Packages installed successfully
Loading

File-Level Changes

Change Details Files
Reordered package installation sequence in DNF to resolve dependency issues
  • Moved glslang installation earlier in the sequence
  • Combined all Vulkan-related package installations into a single DNF command
  • Maintained the same set of packages but changed their installation order
container-images/scripts/build_llama_and_whisper.sh

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @ericcurtin - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider explicitly installing LLVM 17 package to resolve the missing libLLVM-17.so dependency, rather than relying on package ordering.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@rhatdan
Copy link
Member

rhatdan commented Nov 12, 2024

LGTM

@rhatdan rhatdan merged commit 5362315 into main Nov 12, 2024
12 checks passed
@ericcurtin ericcurtin deleted the ramalama-container-fix branch November 12, 2024 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants