Skip to content

[Feature]: Extends Pull Request #152 Regarding Docker File and Configuration#172

Open
sanketshivale wants to merge 5 commits into
Udayraj123:masterfrom
sanketshivale:master
Open

[Feature]: Extends Pull Request #152 Regarding Docker File and Configuration#172
sanketshivale wants to merge 5 commits into
Udayraj123:masterfrom
sanketshivale:master

Conversation

@sanketshivale
Copy link
Copy Markdown

  • Added and Refactored Dockerfile to utilize Docker's layer caching feature for faster builds .
  • Updated README.md for installation and setup of Docker.
  • Optimized Dockerfile by copying requirements.txt first, followed by the rest of the project files later so that we can use caching on build.
  • Updated integration.py for get_monitor fixes in Docker.

@Udayraj123
Copy link
Copy Markdown
Owner

Great to see quick action! Please add a screenshot or short video recording of how it's working on the machine if possible :)

@Udayraj123 Udayraj123 changed the title [Feature]: Extends Pull Request #152 Regrading Docker File and Configuration [Feature]: Extends Pull Request #152 Regarding Docker File and Configuration Mar 5, 2024
@sanketshivale
Copy link
Copy Markdown
Author

Yes for sure !! Here is the screen recording of the build and run process of docker of OMRChecker.

simplescreenrecorder-2024-03-06_01.06.23.mp4

Comment thread src/utils/interaction.py
# If running in a container, make a fake monitor
monitor_window = (
Monitor(0, 0, 1000, 1000, 100, 100, "FakeMonitor", False)
if os.environ.get("OMR_CHECKER_CONTAINER")
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I think we shall also disable the call for imshow using this code change -

def show(name, origin, pause=1, resize=False, reset_pos=None, config=None):
        if(os.environ.get("OMR_CHECKER_CONTAINER")):
            return

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I required some assistance with these. As of now, I understand that we aim to refrain from displaying image metrics in DOCKER CONTAINER. If I am correct in this understanding, then with my current knowledge, I attempted to address the issue on my end. Please let me know if any clarification is needed.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

You can test it once by setting show_image_level to 5 in one of the samples, the code should still finish without any errors. If that works fine, above change should suffice.

Comment thread Dockerfile
Comment thread Dockerfile
Comment thread Dockerfile Outdated
Comment thread README.md
Comment thread README.md Outdated
@Udayraj123
Copy link
Copy Markdown
Owner

Credits to @youainti for creating #152 as the foundation

@youainti
Copy link
Copy Markdown

Thanks for getting this across the finish line. The last 6 months have been very busy for me.

@Udayraj123
Copy link
Copy Markdown
Owner

I guess I jinxed it 😄. Still pending on review comments and I have one more suggestion now -
How about introducing a devcontainer.json file for working in Github codespaces (inspired from OpenMCR)

@sanketshivale
Copy link
Copy Markdown
Author

sanketshivale commented May 6, 2024

@Udayraj123 video for the changes

Now, the next step in dealing with the devcontainer is to review the pull request. If there are any necessary changes, please share them for improvement.

simplescreenrecorder-2024-05-06_23.38.56.mp4

@Udayraj123
Copy link
Copy Markdown
Owner

Great! I'll check this over the weekend and try to get your PR merged!

Comment thread README.md
cd OMRChecker/
```

2. Build the Docker container image (Initial build may take up to 2 minutes depending on your network connection):
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

After merging the dev branch, we will also consider publishing a docker image on dockerhub

Udayraj123
Udayraj123 previously approved these changes May 9, 2024
@Udayraj123 Udayraj123 dismissed their stale review May 10, 2024 21:11

Changing mind to create a dedicated readme for docker setup

Comment thread README.md

### Running OMRChecker in Docker

Once Docker is installed, you can run OMRChecker within a Docker container by following these steps:
Copy link
Copy Markdown
Owner

@Udayraj123 Udayraj123 May 10, 2024

Choose a reason for hiding this comment

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

Let's move this section into a dedicated file.

Suggested change
Once Docker is installed, you can run OMRChecker within a Docker container by following these steps:
For running OMRChecker using docker, please check the [readme-docker.md](https://github.com/Udayraj123/OMRChecker/tree/master/readme-docker.md)

Move this section details into a top level file readme-docker.md

@Udayraj123
Copy link
Copy Markdown
Owner

Almost forgot the docker compose file from this PR. I think we should add that too!

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.

3 participants