Skip to content

fix: issue with [docker-compose up] command #146

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

rizahmeds
Copy link

@rizahmeds rizahmeds commented Sep 13, 2023

Pull Request Title

Fixed issue, while running command docker-compose up locally.

Related Issue

Fixes #144

Description

Type

  • Bug Fix
  • Feature Enhancement
  • Documentation Update
  • Code Refactoring
  • Other (please specify):

Proposed Changes

  • Change python base-image from python:3.11.0-slim to python:3.11-slim-bullseye
  • Remove unnecessary RUNs

Screenshots / Code Snippets (if applicable)

Screenshot 2023-09-13 at 18 49 52

How to Test

  1. docker-compose up

Checklist

  • The code compiles successfully without any errors or warnings
  • The changes have been tested and verified
  • The documentation has been updated (if applicable)
  • The changes follow the project's coding guidelines and best practices
  • The commit messages are descriptive and follow the project's guidelines
  • All tests (if applicable) pass successfully
  • This pull request has been linked to the related issue (if applicable)

Additional Information

Summary by CodeRabbit

  • Chores
    • Updated the base Docker image to use a Debian Bullseye-based tag for improved consistency.
    • Minor formatting improvement in the Dockerfile.

@rizahmeds rizahmeds changed the title fix: issue with docker-compose up command fix: issue with [docker-compose up] command Sep 13, 2023
@srbhr
Copy link
Owner

srbhr commented Sep 14, 2023

Hi @rizahmeds I'll take a look at it.
Thanks for the PR.

@srbhr
Copy link
Owner

srbhr commented Sep 21, 2023

Hi @rizahmeds
I'm unable to get this running properly in my local. I'll ask in the discord for anyone to test it out.

@rizahmeds
Copy link
Author

Hi @rizahmeds I'm unable to get this running properly in my local. I'll ask in the discord for anyone to test it out.

Alright @srbhr Thanks!

@SubramanyamChalla24
Copy link
Contributor

hi @rizahmeds , I was getting the below error when i test your code
image
I think it is an issue with the python version. can you test from your end and verify if it working? are you able to get the similarity score when you are using the config file?

@rizahmeds
Copy link
Author

rizahmeds commented Sep 27, 2023

Hi @SubramanyamChalla24, Thanks for pointing this out.
This error is due to older version of QdrantClient which didn't had url parameter.
Make sure you have qdrant-client>=1.2 in virtualenv or docker container.
(Note: Please do pip list to check qdrant-client version installed)

@srbhr Now i am just wondering, why config.yml have been remove from scripts/similarity path, because we still reading the config file here in this line of code

Screenshot 2023-09-27 at 22 29 08

@SubramanyamChalla24
Copy link
Contributor

Now i am just wondering, why config.yml have been remove from scripts/similarity path, because we still reading the config file here in this line of code

That is because the user needs to add the config file manually as it contains the private api keys.

@rizahmeds
Copy link
Author

@SubramanyamChalla24
Make sense. Earlier we only needed to replace the values that's why I got confused 😅

@SubramanyamChalla24
Copy link
Contributor

This error is due to older version of QdrantClient which didn't had url parameter. Make sure you have qdrant-client>=1.2 in virtualenv or docker container. (Note: Please do pip list to check qdrant-client version installed)

I have the latest version. It's not an error with the version though. can you check from your side including the config file?

@rizahmeds
Copy link
Author

rizahmeds commented Sep 27, 2023

Yes, i already checked with the config.yaml file.
Since I do not have the cohere API key(Because it requires me to add a credit card detail, which I don't have 🥺), it raises another exception for me. So I can't completely test it.

@SubramanyamChalla24
Copy link
Contributor

Cohere doesn't require a credit card. Can you check it once?It required a card before but it doesn't need it now.

Yes, i already checked with the config.yaml file. Since I do not have the cohere API key(Because it requires me to add a credit card detail, which I don't have 🥺), it raises another exception for me. So I can't completely test it.

@rizahmeds
Copy link
Author

Thanks for the update @SubramanyamChalla24. Yes i have got the Cohere Trial key.
Then i reinitialized qdrant cluster which was suspended. Here you go, Finished getting similarity score.

Screenshot 2023-09-28 at 00 31 26

@srbhr
Copy link
Owner

srbhr commented Sep 28, 2023

Great work in collaboration @rizahmeds and @SubramanyamChalla24 🔥
I like the teamwork here.
So, is this PR working now?

@SubramanyamChalla24
Copy link
Contributor

So, is this PR working now?

I couldn't replicate it. It still shows the same error though. Probably someone has to try and verify it.

Copy link

coderabbitai bot commented May 24, 2025

Walkthrough

The Dockerfile was updated to use the python:3.11-slim-bullseye base image instead of python:3.11.0-slim, aligning the OS layer to Debian Bullseye while keeping Python at version 3.11. A blank line was also added for formatting purposes.

Changes

File(s) Change Summary
build.dockerfile Changed base image to python:3.11-slim-bullseye and added a blank line after FROM.

Assessment against linked issues

Objective Addressed Explanation
Update Docker base image to address dependency resolution/build issues (#144)

Poem

In Docker’s warren, a base anew,
Bullseye hops in, slim and true.
Python stays, but now the ground
Is Debian’s turf, more stable found.
A blank line hops, formatting neat—
CodeRabbit’s work is hard to beat! 🐇🐳

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate sequence diagram to generate a sequence diagram of the changes in 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: 1

🧹 Nitpick comments (5)
build.dockerfile (5)

1-2: Consider pinning to a specific patch version for reproducible builds.

The floating tag python:3.11-slim-bullseye will track upstream patch releases, which can lead to subtle changes over time. Pin to a known patch (e.g. python:3.11.14-slim-bullseye) to lock in your build environment.


4-5: Combine apt steps into one layer & clean up caches.

Merging apt-get update and install, and trimming APT lists, reduces layers and image size:

-RUN apt-get update
-RUN apt-get install -y build-essential python-dev git
+RUN apt-get update && \
+    apt-get install -y --no-install-recommends build-essential python3-dev git && \
+    rm -rf /var/lib/apt/lists/*

6-8: Merge pip upgrade and dependencies & use python -m pip.

Consolidate into one step and avoid layer cache of wheels:

-RUN pip install -U pip setuptools wheel
-COPY requirements.txt requirements.txt
-RUN pip install -r requirements.txt
+COPY requirements.txt ./
+RUN python -m pip install --upgrade pip setuptools wheel && \
+    python -m pip install --no-cache-dir -r requirements.txt

9-9: Use a .dockerignore for the COPY . . step.

Without excluding irrelevant files (e.g., .git, local builds, credentials), the image can bloat and builds slow down. Add a .dockerignore to filter out unnecessary files.


11-11: Reconsider running run_first.py at build time.

Invoking initialization scripts during image build can bake stale data and slow rebuilds. Consider moving run_first.py into the container startup logic (entrypoint/CMD) or a dedicated initialization step.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 004b8a0 and 08181e4.

📒 Files selected for processing (1)
  • build.dockerfile (1 hunks)
🔇 Additional comments (1)
build.dockerfile (1)

1-2: Base image updated to Debian Bullseye slim (fixes docker-compose up issues).

Switching to python:3.11-slim-bullseye aligns the OS layer with Debian Bullseye and addresses the previous docker-compose up failure locally.

@@ -1,4 +1,5 @@
FROM python:3.11.0-slim
FROM python:3.11-slim-bullseye

WORKDIR /data/Resume-Matcher
RUN apt-get update
RUN apt-get install -y build-essential python-dev git
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Use python3-dev instead of python-dev.

On Bullseye, python-dev points to Python 2 headers. Installing python3-dev ensures C extensions target the active Python 3 interpreter.

🤖 Prompt for AI Agents
In build.dockerfile at line 5, replace the package `python-dev` with
`python3-dev` in the apt-get install command to ensure the installation of
Python 3 development headers instead of Python 2, which is outdated on Bullseye.

@srbhr
Copy link
Owner

srbhr commented May 29, 2025

@rizahmeds thanks for this PR. There's a completely new version of Resume Matcher we've worked up. If you're on Discord we're looking for people who can help in improving that.

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.

Issue with docker pull
4 participants