-
Notifications
You must be signed in to change notification settings - Fork 97
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
[WiP] Draft for Gentoo configuration #611
base: master
Are you sure you want to change the base?
Changes from 6 commits
27ca573
304d24e
32cd210
91df306
3428ab9
7f72cf7
01fd95a
a5df85f
39b79fc
6bca6f5
9b0d75f
c8cb922
456c479
30ab193
e7f1720
758951b
8b5df1d
722e555
5420c04
54c98f6
5fd6303
cc0d86e
6887052
6d76eb5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,49 @@ | ||||||||||||||||||||
--- | ||||||||||||||||||||
# Instructions to add NeuroDebian repositories. | ||||||||||||||||||||
|
||||||||||||||||||||
name: gentoo | ||||||||||||||||||||
url: https://www.gentoo.org/ | ||||||||||||||||||||
binaries: | ||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
TODO: defaults somehow -- may be just straight in the code as |
||||||||||||||||||||
instructions: | | ||||||||||||||||||||
FROM docker.io/gentoo/portage:20240324 as portage | ||||||||||||||||||||
FROM docker.io/gentoo/stage3:20240318 | ||||||||||||||||||||
# copy the entire portage volume in | ||||||||||||||||||||
COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo | ||||||||||||||||||||
RUN emerge -v --noreplace dev-vcs/git | ||||||||||||||||||||
RUN emerge -v1u portage | ||||||||||||||||||||
# Pinned commits for the dependency tree state | ||||||||||||||||||||
ARG gentoo_hash=2d25617a1d085316761b06c17a93ec972f172fc6 | ||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this needs to use |
||||||||||||||||||||
ARG science_hash=73916dd3680ffd92e5bd3d32b262e5d78c86a448 | ||||||||||||||||||||
ARG FEATURES="-ipc-sandbox -network-sandbox -pid-sandbox" | ||||||||||||||||||||
# This will be bound, and contents available outside of container | ||||||||||||||||||||
RUN mkdir /outputs | ||||||||||||||||||||
COPY .gentoo/portage/ /etc/portage/ | ||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO: copy from https://github.com/TheChymera/neurodocker_g/tree/master but in the future some might also want to become templates |
||||||||||||||||||||
# Moving gentoo repo from default rsync to git | ||||||||||||||||||||
RUN rm /var/db/repos/gentoo -rf | ||||||||||||||||||||
# Cloning manually to prevent vdb update, pinning state via git | ||||||||||||||||||||
# Allegedly it's better to chain everything in one command, something with container layers 🤔 | ||||||||||||||||||||
RUN \ | ||||||||||||||||||||
REPO_URL=$(grep "^sync-uri" /etc/portage/repos.conf/gentoo | sed -e "s/sync-uri *= *//g") && \ | ||||||||||||||||||||
mkdir -p /var/db/repos/gentoo && pushd /var/db/repos/gentoo && git init . && \ | ||||||||||||||||||||
git remote add origin ${REPO_URL} && \ | ||||||||||||||||||||
git fetch --filter="blob:none" origin $gentoo_hash && \ | ||||||||||||||||||||
git reset --hard $gentoo_hash && rm .git -rf && popd && \ | ||||||||||||||||||||
REPO_URL=$(grep "^sync-uri" /etc/portage/repos.conf/science | sed -e "s/sync-uri *= *//g") && \ | ||||||||||||||||||||
mkdir -p /var/db/repos/science && pushd /var/db/repos/science && git init . && \ | ||||||||||||||||||||
git remote add origin ${REPO_URL} && \ | ||||||||||||||||||||
git fetch --filter="blob:none" origin $science_hash && \ | ||||||||||||||||||||
git reset --hard $science_hash && rm .git -rf && popd | ||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. all the "freezing" might make sense to move into a script. this would allow for better reuse... also note that apparently for neurodebian -- freezing is done somewhere else than this template |
||||||||||||||||||||
# Old Christian: Remove sync-uri to not accidentally re-sync if we work with the package management interactively | ||||||||||||||||||||
# Christian from the future: Maybe we want the option to re-sync if we're debugging it interactively... | ||||||||||||||||||||
#RUN sed -i /etc/portage/repos.conf/{gentoo,science} -e "s/sync-type *= *git/sync-type =/g" | ||||||||||||||||||||
#RUN sed -i /etc/portage/repos.conf/{gentoo,science} -e "/sync-uri/d" | ||||||||||||||||||||
#RUN sed -i /etc/portage/repos.conf/{gentoo,science} -e "/sync-git-verify-commit-signature/d" | ||||||||||||||||||||
# Make sure all CPU flags supported by the hardware are whitelisted | ||||||||||||||||||||
# This only affects packages with handwritten assembly language optimizations, e.g. ffmpeg. | ||||||||||||||||||||
# Removing it is safe, software will just not take full advantage of processor capabilities. | ||||||||||||||||||||
#RUN emerge cpuid2cpuflags | ||||||||||||||||||||
#RUN echo "*/* $(cpuid2cpuflags)" > /etc/portage/package.use/00cpu-flags | ||||||||||||||||||||
### Emerge cool stuff here | ||||||||||||||||||||
### Autounmask-continue enables all features on dependencies which the top level packages require | ||||||||||||||||||||
### By default this needs user confirmation which would interrupt the build. | ||||||||||||||||||||
RUN emerge --autounmask-continue afni fsl | ||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
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.
there is nothing gentoo below yet, misleading commit message etc. Please squash it with whatever actually gentoo specific changes you place into this PR