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

Update the Dockerfile to allow docker to download a sufficiently new version of oneflow #1172

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

Conversation

jiashenggu
Copy link

@jiashenggu jiashenggu commented Dec 27, 2024

#395
this issue came from the install of oneflow==0.9, which should be >=0.9.1

Summary by CodeRabbit

  • Chores
    • Updated the installation command for the oneflow package to allow for upgrades and pre-release versions.

Copy link
Contributor

coderabbitai bot commented Dec 27, 2024

Walkthrough

The pull request introduces a modification to the Dockerfile, specifically updating the installation command for the oneflow package. The change involves adding upgrade (-U) and pre-release (--pre) flags to the pip installation process, which allows for installing the latest pre-release version of the package and upgrading any existing installation.

Changes

File Change Summary
Dockerfile Updated oneflow package installation command with -U and --pre flags

Poem

🐰 A Rabbit's Pip Upgrade Tale

With flags -U and --pre so bright,
Oneflow dances to a new height!
Upgrading packages with glee,
Pre-release versions set them free
A pip command, both bold and neat! 🚀


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 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. (Beta)
  • @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
Contributor

@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 (1)
Dockerfile (1)

7-7: Add version constraints to oneflow installation.

While the -U and --pre flags will help get a newer version of oneflow, it's recommended to add version constraints to prevent potential compatibility issues with future releases.

Apply this diff to add version constraints:

-RUN pip install -U --pre -f ${ONEFLOW_PIP_INDEX} ${ONEFLOW_PACKAGE_NAME} "nvidia-cudnn-cu11>=8.9,<9.0"
+RUN pip install -U --pre -f ${ONEFLOW_PIP_INDEX} "${ONEFLOW_PACKAGE_NAME}>=0.9.1" "nvidia-cudnn-cu11>=8.9,<9.0"

This ensures you get at least version 0.9.1 while still allowing newer versions through the --pre flag.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 73eaeb7 and 0cf8e0a.

📒 Files selected for processing (1)
  • Dockerfile (1 hunks)
🔇 Additional comments (1)
Dockerfile (1)

7-8: Verify compatibility with fixed-version dependencies.

The installation uses pre-release versions of oneflow but fixed versions for other dependencies. Let's verify there are no known compatibility issues.

✅ Verification successful

Let me gather more information about the dependency versions and compatibility.


Fixed dependency versions are compatible with OneFlow

Based on the verification results:

  1. The setup.py files show that OneDiff is designed to work with transformers>=4.27.1 and diffusers>=0.19.3, which means the fixed versions in the Dockerfile are compatible.
  2. The project's README explicitly states: "You can choose the latest versions you want for diffusers or transformers."
  3. No compatibility issues were found in the GitHub issues search between OneFlow and these specific versions.
  4. The requirements files across different parts of the codebase show consistent usage of these versions, indicating they are well-tested combinations.
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check compatibility between oneflow and other dependencies

# Check if there are any reported issues mentioning compatibility between oneflow and the fixed versions
gh api graphql -f query='
{
  search(query: "repo:siliconflow/onediff is:issue oneflow transformers-4.27.1 diffusers-0.19.3", type: ISSUE, first: 5) {
    nodes {
      ... on Issue {
        title
        url
        state
      }
    }
  }
}
'

# Check if the dependencies are mentioned in any recent commits
git log --grep="transformers.*4.27.1\|diffusers.*0.19.3\|oneflow" -n 5

Length of output: 840


Script:

#!/bin/bash
# Check for any version-related configurations or requirements
fd requirements.txt --exec cat {} \;

# Look for any version constraints in setup files
fd setup.py --exec cat {} \;

# Search for any dependency version specifications in the codebase
rg -A 2 "transformers|diffusers|huggingface-hub" --type yaml --type txt

# Check if there are any version-related comments or documentation
rg "version|compatibility" README.md || true

Length of output: 6160

@jackalcooper
Copy link
Collaborator

- U might introduce unwanted updates?

@jiashenggu
Copy link
Author

- U might introduce unwanted updates?

I copy the command from README.md.

@jackalcooper
Copy link
Collaborator

- U might introduce unwanted updates?

I copy the command from README.md.

Did you face any issue specific to this?

Some expectations:

  • On linux, 0.9.1 will be correctly installed if the index url is provided
  • if the index url is not provided, adding >=0.9.1 or -U or --pre will not help

@jiashenggu
Copy link
Author

- U might introduce unwanted updates?

I copy the command from README.md.

Did you face any issue specific to this?

Some expectations:

  • On linux, 0.9.1 will be correctly installed if the index url is provided
  • if the index url is not provided, adding >=0.9.1 or -U or --pre will not help

#395
Just like this issue, it installed oneflow 0.9.0

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