-
Notifications
You must be signed in to change notification settings - Fork 19
docs: add Docker installation guide for OpenJudge and training enviro… #84
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
Conversation
Summary of ChangesHello @XieLipeng0830, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the OpenJudge project by introducing robust Docker support for both its evaluation and training environments. These additions aim to streamline the setup process, ensure environment consistency, and simplify dependency management for users. The accompanying documentation updates provide clear guidance on leveraging these new containerized solutions, alongside more detailed manual installation steps for complex training setups. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces Docker support for both the base OpenJudge environment and the more complex training environment, which is a great addition for improving reproducibility and simplifying setup. The documentation has also been updated accordingly. My review focuses on improving the Dockerfiles for better optimization and reproducibility, and I've also noted a minor typo in the documentation. Overall, these are valuable changes.
Dockerfile
Outdated
| "loguru>=0.7.3,<0.8.0" \ | ||
| "json_repair>=0.54.0,<1.0.0" \ | ||
| "pydantic>=2.11.5,<3.0.0" \ | ||
| "openai>=1.92.0,<2.0.0" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version requirement for openai here (>=1.92.0,<2.0.0) is inconsistent with what's specified in pyproject.toml and cookbooks/training_judge_model/Dockerfile.train (>=1.85.0,<2.0.0). To ensure consistency across the project and avoid potential dependency conflicts, it's best to align this with the version in pyproject.toml.
"openai>=1.85.0,<2.0.0" \
| "scikit-learn>=1.0.0" | ||
|
|
||
| # Install OpenJudge from GitHub | ||
| RUN pip install --no-cache-dir git+https://github.com/agentscope-ai/OpenJudge.git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Installing from a git repository URL without pinning to a specific commit hash or tag can lead to non-reproducible builds, as it will pull the latest commit from the main branch. This might introduce breaking changes unexpectedly. For stable and predictable builds, please pin the installation to a specific commit hash or tag.
For example:
RUN pip install --no-cache-dir git+https://github.com/agentscope-ai/OpenJudge.git@your-commit-hash
| # ============================================================================= | ||
| # 8. OpenJudge | ||
| # ============================================================================= | ||
| RUN pip install --no-cache-dir --no-deps git+https://github.com/agentscope-ai/OpenJudge.git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Installing from a git repository URL without pinning to a specific commit hash or tag can lead to non-reproducible builds, as it will pull the latest commit from the main branch. This might introduce breaking changes unexpectedly. For stable and predictable builds, please pin the installation to a specific commit hash or tag.
For example:
RUN pip install --no-cache-dir --no-deps git+https://github.com/agentscope-ai/OpenJudge.git@your-commit-hash
| RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
| git \ | ||
| curl \ | ||
| build-essential \ | ||
| && rm -rf /var/lib/apt/lists/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To optimize the Docker image size and reduce the number of layers, it's a good practice to chain related RUN commands. You can combine this apt-get installation with the subsequent pip install and pip cache purge commands into a single RUN instruction. This creates a single layer, making the image more compact and potentially speeding up builds.
| RUN pip install --no-cache-dir "sglang[all]==0.5.2" && \ | ||
| pip install --no-cache-dir torch-memory-saver && \ | ||
| pip install --no-cache-dir "vllm==0.11.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| conda create -n openjudeg_train python==3.12 | ||
| conda activate openjudeg_train |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There appears to be a typo in the conda environment name. It's written as openjudeg_train, but it should likely be openjudge_train for consistency. This will cause an error for users who copy and paste the command.
| conda create -n openjudeg_train python==3.12 | |
| conda activate openjudeg_train | |
| conda create -n openjudge_train python==3.12 | |
| conda activate openjudge_train |
ployts
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…nment
OpenJudge Version
[The version of OpenJudge you are working on, e.g.
import openjudge; print(openjudge.__version__)]Description
[Please describe the background, purpose, changes made, and how to test this PR]
Checklist
Please check the following items before code is ready to be reviewed.
pre-commit run --all-filescommand