Skip to content

Follow-up: include runtime data directory in Docker image - #18

Merged
ThomasBury merged 1 commit into
mainfrom
codex/github-mention-fix-configuration-regressions-and-modernize
Mar 3, 2026
Merged

Follow-up: include runtime data directory in Docker image#18
ThomasBury merged 1 commit into
mainfrom
codex/github-mention-fix-configuration-regressions-and-modernize

Conversation

@ThomasBury

@ThomasBury ThomasBury commented Mar 3, 2026

Copy link
Copy Markdown
Owner

Motivation

  • The Dockerfile refactor removed copying the top-level data/ tree which caused the /predict endpoint (which reads /app/data/atp_data_production.feather in non-testing mode) to fail at runtime with missing data files.

Description

  • Add COPY data ./data to Dockerfile so runtime data assets are present under /app/data, while keeping the dependency-manifests-first layering (manifests → deps → source/data) to preserve build cache behavior.

Testing

  • Inspected the updated Dockerfile with nl -ba Dockerfile | sed -n '1,80p' and confirmed the new COPY data ./data line; the inspection succeeded.
  • Queried Dockerfile reference with curl -s https://docs.docker.com/reference/dockerfile/ | head -n 20 for context; the call succeeded.
  • Verified repository state and commit with git status --short and git rev-parse HEAD to ensure the change was committed (commit 9dabf11); both commands succeeded.

Codex Task

Summary by CodeRabbit

  • Chores
    • Updated container build process to include runtime data assets in the containerized application. The deployment configuration now copies necessary data files alongside application source code, ensuring all required runtime data is available when the application is deployed. This improves the reliability of the container image by including all required assets.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 addresses a critical runtime issue in the Docker image where necessary data files were not being copied during the build process. By adding a COPY data ./data instruction to the Dockerfile, it ensures that the /predict endpoint can access its required data, thereby restoring full functionality. The change maintains the existing build cache strategy.

Highlights

  • Dockerfile Update: Included the data/ directory in the Docker image to ensure runtime data assets are present, resolving an issue where the /predict endpoint failed due to missing data files.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • Dockerfile
    • Added a COPY data ./data instruction to include runtime data assets.
    • Updated the comment for copying application source to also mention runtime data assets.
Activity
  • Inspected the updated Dockerfile to confirm the new COPY data ./data line.
  • Queried Dockerfile reference for context.
  • Verified repository state and commit 9dabf11.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai

coderabbitai Bot commented Mar 3, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7b122ee and 2c81d40.

📒 Files selected for processing (1)
  • Dockerfile

📝 Walkthrough

Walkthrough

The Dockerfile was updated to include copying runtime data assets. A comment was revised to clarify the dual purpose of copying application source and runtime data, and a new COPY instruction transfers data from the local ./data directory into the container's ./data directory.

Changes

Cohort / File(s) Summary
Dockerfile Configuration
Dockerfile
Updated comment and added COPY instruction to include runtime data directory in the Docker image.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Hops with glee through Docker's door,
Data assets from shore to shore,
Runtime treasures safely stashed,
In the image, neatly cached!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding a runtime data directory to the Docker image, which directly addresses the motivation of fixing the /predict endpoint by including missing data files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/github-mention-fix-configuration-regressions-and-modernize

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

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 correctly adds the data directory to the Docker image, which is necessary for the application to run. I've suggested a small improvement to the Dockerfile to optimize layer caching by reordering the COPY instructions. This can improve build times when only the source code changes.

Comment thread Dockerfile
# Copy application source.
# Copy application source and runtime data assets.
COPY src ./src
COPY data ./data

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

For better Docker layer caching, it's a good practice to copy directories that change less frequently first. Runtime data assets (data) likely change less often than application source code (src). Consider moving this line before the COPY src ./src line to improve build performance when only source code changes.

@ThomasBury
ThomasBury merged commit 092c607 into main Mar 3, 2026
1 check passed
@ThomasBury
ThomasBury deleted the codex/github-mention-fix-configuration-regressions-and-modernize branch March 3, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant