-
Notifications
You must be signed in to change notification settings - Fork 287
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
DOCKER: Build wheel and install in two-stage build #2859
Conversation
62a0de2
to
3f28bda
Compare
.zenodo.json | ||
.travis.yml | ||
.readthedocs.yml | ||
CONTRIBUTING.md |
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.
These things were removed to avoid getting a dirty repository. We now do not do a COPY .
outside of the wheel building stage, so this should not pollute the image.
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends git | ||
COPY . /src/fmriprep | ||
RUN python -m build /src/fmriprep |
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've tested locally. Modifying the repository will make this rerun but will not cause a cache miss on L33+ until there's another change in the Dockerfile or a COPY
/ADD
command fails a hash check.
1352a77
to
918c856
Compare
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.
+1 on removing the versioneer hack
76e9866
to
9ff8d68
Compare
[skip ds005][skip ds054][skip ds210]
Changes proposed in this pull request
This PR aims to make the Docker build less fragile by building the package wheel in an initial stage with full git information, and then copying only the wheel over to the main build.
Assuming that the COPY at L29 doesn't break the caching of everything afterwards, then we should be good. Otherwise we can switch to something like:
This will also allow us to stop using a custom versioneer.