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

Updated the dockerfile with new OpenMS version issue #128 #165

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Srajald
Copy link
Contributor

@Srajald Srajald commented Mar 8, 2025

Ensured Qt6 is used instead of Qt5 by:

  • Installing Qt6 dependencies (qt6-base-dev, qt6-opengl6-dev, qt6-tools-dev).
  • Setting Qt6_DIR and CMAKE_PREFIX_PATH to explicitly point to Qt6.
  • Linked qmake to Qt6 (ln -sf /usr/lib/qt6/bin/qmake /usr/bin/qmake).
  • Verified correct Qt6 version using qmake --version and ls /usr/lib/x86_64-linux-gnu/cmake/Qt6.

Optimized the Docker build process by:

  • Grouping package installations to reduce layers and speed up builds.
  • Removing unnecessary files (rm -rf OpenMS openms-build) to reduce image size.

Summary by CodeRabbit

  • Chores
    • Upgraded the build environment to use the latest release branch.
    • Transitioned dependency support from an older framework version to the current one.
    • Updated configuration settings to ensure the correct framework is used during builds.

Copy link

coderabbitai bot commented Mar 8, 2025

Walkthrough

The Dockerfile has been revised to update the OpenMS branch from release/3.2.0 to release/3.3.0 and switch from Qt5 to Qt6. Qt5 package installations have been removed, and corresponding Qt6 packages are now installed. Environment variables for specifying Qt6 installation paths have been added, along with commands that create a symbolic link for qmake and verify the new Qt6 setup. The CMake configuration has also been updated to include the Qt6 paths.

Changes

File Change Summary
Dockerfile - Updated OPENMS_BRANCH from release/3.2.0 to release/3.3.0
- Removed Qt5 packages (qt5-default, qtbase5-dev, qttools5-dev-tools, libqt5svg5-dev, libqt5opengl5-dev)
- Added Qt6 packages (qt6-base-dev, qt6-base-dev-tools, libqt6svg6-dev, libqt6opengl6-dev, qt6-l10n-tools, qt6-tools-dev)
- Introduced environment variables Qt6_DIR and CMAKE_PREFIX_PATH
- Created a symbolic link for qmake and updated CMake configuration to use the Qt6 path

Sequence Diagram(s)

sequenceDiagram
    participant D as Docker Build
    participant F as Dockerfile
    participant P as Package Installer
    participant E as Environment Setup
    participant V as Verification
    participant C as CMake Configuration

    D->>F: Start Docker build
    F->>P: Remove Qt5 packages and install Qt6 packages
    F->>E: Set environment variables (Qt6_DIR & CMAKE_PREFIX_PATH)
    E->>F: Create symbolic link for qmake
    F->>V: Verify Qt6 installation (qmake version & cmake directory)
    F->>C: Pass Qt6 paths to CMake configuration
Loading

Suggested reviewers

  • jcharkow

Poem

I'm a playful rabbit, hopping with glee,
In a Docker world where Qt6 runs free.
From branch 3.2 to 3.3 we leap,
With new paths set for a build so deep.
Code and carrots, what a treat! 🐰✨


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
Dockerfile (2)

40-41: Setting Qt6 Environment Variables
Defining Qt6_DIR and CMAKE_PREFIX_PATH for Qt6 is a good practice to ensure the build system can locate the correct Qt6 libraries and tools.

Suggestion: Consider using these environment variables directly in the CMake configuration (see comments in lines 98-99) to avoid duplicating or hardcoding similar paths.


98-99: Align CMake Prefix Path with Environment Variables
The CMake configuration command currently hardcodes the prefix path as /OpenMS/contrib-build/;/usr/;/usr/local;/usr/lib/qt6. Since the environment variable CMAKE_PREFIX_PATH was set earlier to /usr/lib/x86_64-linux-gnu/cmake/Qt6:/usr/lib/qt6, it would help to integrate this variable to ensure consistency and simplify future updates. For example, you might consider updating the command as follows:

-RUN /bin/bash -c "cmake -DCMAKE_BUILD_TYPE='Release' -DCMAKE_PREFIX_PATH='/OpenMS/contrib-build/;/usr/;/usr/local;/usr/lib/qt6' -DHAS_XSERVER=OFF -DBOOST_USE_STATIC=OFF -DPYOPENMS=ON ../OpenMS -DPY_MEMLEAK_DISABLE=On"
+RUN /bin/bash -c "cmake -DCMAKE_BUILD_TYPE='Release' -DCMAKE_PREFIX_PATH=\"$CMAKE_PREFIX_PATH;/OpenMS/contrib-build/;/usr/;/usr/local\" -DHAS_XSERVER=OFF -DBOOST_USE_STATIC=OFF -DPYOPENMS=ON ../OpenMS -DPY_MEMLEAK_DISABLE=On"

This change leverages the previously set environment variable, minimizes duplication, and reduces potential errors if the Qt6 paths change later.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7183499 and d124493.

📒 Files selected for processing (1)
  • Dockerfile (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: build-openms
  • GitHub Check: build-simple-app
  • GitHub Check: build-full-app
🔇 Additional comments (5)
Dockerfile (5)

12-12: Update OpenMS Branch Argument
The branch argument has been successfully updated to release/3.3.0. This ensures that the build now pulls from the updated OpenMS release.


34-36: Remove Legacy Qt5 Packages
The removal of Qt5 packages (using apt-get remove -y ... || true) is implemented correctly to avoid conflicts with the new Qt6 installations. Ensure that none of the removed packages are needed in any other part of the build process.


37-38: Installation of Qt6 Dependencies
The new Qt6 package groups (qt6-base-dev, qt6-base-dev-tools, libqt6svg6-dev, libqt6opengl6-dev, qt6-l10n-tools, and qt6-tools-dev) are installed appropriately. This aligns with the goal of moving from Qt5 to Qt6.


44-44: Ensure qmake Points to Qt6
Creating a symbolic link for qmake to point to the Qt6 executable is correctly implemented. This ensures that any tool or script invoking qmake will use the Qt6 version.


47-48: Verification of Qt6 Installation
Running qmake --version and listing the /usr/lib/x86_64-linux-gnu/cmake/Qt6 directory are effective sanity checks to confirm a correct Qt6 installation.

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.

1 participant