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

Use pip install with --no-cache-dir in Dockerfile.github_action #1536

Merged
merged 1 commit into from
Feb 15, 2025

Conversation

PeterDaveHello
Copy link
Contributor

@PeterDaveHello PeterDaveHello commented Feb 14, 2025

This pull request includes a small change to the Dockerfile.github_action file. The change modifies the pip install command to use the --no-cache-dir option, which prevents the caching of packages during installation.

This will help minimize the Docker image size, as below:

REPOSITORY            TAG             IMAGE ID       CREATED         SIZE
pr-agent              after           d7d7a03e546b   3 hours ago     1.48GB
pr-agent              before          ef44e279f5aa   3 hours ago     1.59GB

cc #1510

Copy link
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ No major issues detected

Copy link
Contributor

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Optimize Docker image size further

Consider using --no-deps flag alongside --no-cache-dir to prevent installing
unnecessary dependencies and further reduce the Docker image size.

Dockerfile.github_action [6]

-RUN pip install --no-cache-dir . && rm pyproject.toml requirements.txt
+RUN pip install --no-cache-dir --no-deps . && rm pyproject.toml requirements.txt
  • Apply this suggestion
Suggestion importance[1-10]: 3

__

Why: While adding --no-deps could reduce image size, it might be risky as it skips installing required dependencies specified in the project's requirements, potentially breaking the application functionality.

Low
  • Author self-review: I have reviewed the PR code suggestions, and addressed the relevant ones.

@PeterDaveHello
Copy link
Contributor Author

It looks like my edit overwrite qodo's edit 😅

@mrT23
Copy link
Collaborator

mrT23 commented Feb 15, 2025

👍

@mrT23 mrT23 merged commit 62c47f9 into qodo-ai:main Feb 15, 2025
2 checks passed
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.

2 participants