Skip to content
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

Adding Fuzzy to Neurodocker #398

Open
gkiar opened this issue May 17, 2021 · 4 comments
Open

Adding Fuzzy to Neurodocker #398

gkiar opened this issue May 17, 2021 · 4 comments

Comments

@gkiar
Copy link

gkiar commented May 17, 2021

Hey all,

Recently we've made a lot of progress on a project called Fuzzy, which enables the resting of numerical uncertainty in pipelines. With multistage Docker builds, it has also become very easy to integrate the perturbed version of libraries into other systems, e.g. https://github.com/verificarlo/fuzzy#using-fuzzy-in-multi-stage-builds

I think it would be great to add a switch to neurodocker, such as --fuzzy, where we could add a build stage which simply copies over perturbed libraries to the environment such that the stability of an arbitrary pipeline/environment configuration can be tested.

What would be the best way to implement this?

Thanks!

@kaczmarj
Copy link
Collaborator

@gkiar - looks cool! i would take a look at #378. i'm working on refactoring neurodocker there, and i think using that code, it should be easier to add things like fuzzy.

does fuzzy primarily use COPY instructions? we might not even need multi-stage builds. i think this would work:

COPY --from=verificarlo/fuzzy:latest /opt/mca-libmath/libmath.so /opt/mca-libmath/

@kaczmarj
Copy link
Collaborator

kaczmarj commented May 17, 2021

Yes I was able to copy from a different docker image without using multi-stage builds.

the dockerfile:

FROM alpine:3.12
COPY --from=alpine:3.10 /etc/os-release /etc/

build:

docker build -t test-copy - < Dockerfile

test that os-release points to the older alpine:

$ docker run --rm test-copy cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.10.9
PRETTY_NAME="Alpine Linux v3.10"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://bugs.alpinelinux.org/"

@gkiar
Copy link
Author

gkiar commented May 17, 2021

Awesome, you're totally right in that copying over the recompiled libraries is enough to do the trick, I just hadn't realized you can do that arbitrarily from tagged images :)

I'll take a look at #378 this week in case more sets of eyes help in the integration of your PR to the main repo, then we can build the quick fuzzy flag on top.

@Remi-Gau
Copy link
Collaborator

@gkiar is this something you still want to integrate in neurodocker?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants