-
Notifications
You must be signed in to change notification settings - Fork 70
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
Add Docker image file for CLI #168
Conversation
Thank you for the pull request!The Scribe team will do our best to address your contribution as soon as we can. The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :) If you're not already a member of our public Matrix community, please consider joining! We'd suggest using Element as your Matrix client, and definitely join the General and Data rooms once you're in. Also consider joining our bi-weekly Saturday dev syncs. It'd be great to have you! Maintainer checklist
|
So here the next step is pushing docker image to the registry. From which docker id shall I push? |
I'll send this one over to @wkyoshida as he's the expert here :) :) |
hmm I guess we have some options. We could create a repository in Docker Hub for us or we could use GitHub's registry. The latter could be cool since I believe it'd prominently show up under The former would likely allow us to save several versions of the Docker image though, since we can go beyond 500MB |
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.
🚀
Adding some thoughts that came to mind..
ENV PYTHONPATH=/app/src | ||
|
||
# Set the entry point to the main CLI script | ||
ENTRYPOINT ["python", "src/scribe_data/cli/main.py"] |
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.
What about a version of the Dockerfile
where scribe-data
gets installed instead, as opposed to running python ...
? Running via python
still works tbh though, just wondering if we could make the Dockerfile
this way.
ENV PYTHONPATH=/app/src | ||
|
||
# Set the entry point to the main CLI script | ||
ENTRYPOINT ["python", "src/scribe_data/cli/main.py"] |
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.
What's the behavior btw with the saved output files? They just make me wonder we might need a Docker volume to store and retain the output results after the container exits. Are they getting saved inside the container atm?
What's the plan for this one here? @mhmohona, are we ready to merge? Just checking in as you were saying it's hard for you to test this, so do you need support finishing this up? |
So I was able to successfully test it in Github codespace. I think I can do it till the end. |
Nice!! RUN apt-get update && apt-get install -y \
build-essential \
pkg-config \
libicu-dev \
&& rm -rf /var/lib/apt/lists/* For context @andrewtavis , building with the @mhmohona might have to run something like the below actually - now that I look at it again. Didn't explicitly try it myself though COPY Brewfile /app/
RUN brew bundle install --file=Brewfile && \
export PATH="/opt/homebrew/opt/icu4c/bin:/opt/homebrew/opt/icu4c/sbin:$PATH" && \
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/opt/homebrew/opt/icu4c/lib/pkgconfig" |
I got error if i add and its the image in docker hub - https://hub.docker.com/repository/docker/mhmohona/scribe-data-cli
@wkyoshida, what do you think about it? |
Hmm - it seems that the image ends up pretty big.. |
With the With that information, we can go from there and modify the |
Its the output of docker history -
|
One thing we could try for now is to actually remove the multi-stage aspect of the
Yeah - what I had first sent you in Matrix is slightly off. Notice that it's using things like The below might be closer to what we need, but I haven't tested it myself: COPY Brewfile /app/
RUN brew bundle install --file=Brewfile && \
export PATH="/opt/homebrew/opt/icu4c/bin:/opt/homebrew/opt/icu4c/sbin:$PATH" && \
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/opt/homebrew/opt/icu4c/lib/pkgconfig" NOTE: This will likely need a step before to install brew though |
Just a quick note for clarification - All the layers further than |
Alrighty - So in tweaking the
CC: @andrewtavis |
Thank you for looking into it @wkyoshida. |
I did also decide to actually go with removing the multi-stage aspect of the |
Points on the above:
|
🚀 - removed with cb29d7b
Ya that sounds good! For references, I tested out building the image after removing the soon-to-scrapped dependencies. The
So yea - I think once we're able to scrap
I was thinking of leaving it entirely to Scribe-Server actually; so eventually we could even scrap |
|
Note that this can be updated and merged once #292 has been finished as then all of the above dependencies will be gone :) |
Alright the old translation process has been removed, so we should be good to work on this again without excessively large images :) |
How are we doing here now? Do we need to include some documentation on how to get the container up and running? :) |
So now it took 48 minute. and it's docker history output -
It's so much better than before. What do you think @wkyoshida? |
Are we able to expand the readme and docs a bit with instructions to deploy the Docker setup, @mhmohona? |
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.
I'm assuming that changes to this file have been taken care of in the overall discussion here :) Let's look into any changes that are needed post uploading it to DockerHub later this week 🚀
Thanks for the persistence here, @mhmohona, and also for the review, @wkyoshida!
Contributor checklist
Description
Related issue
Fixes - #150