ANTsX / ANTsR

R interface to the ANTs biomedical image processing library
https://antsx.github.io/ANTsR
Apache License 2.0
127 stars 35 forks source link

Docker image with ANTsR ready to go? #265

Closed dorianps closed 4 years ago

dorianps commented 5 years ago

I was wondering why we don't have a docker image with ANTsR installed in it. Has anybody thought about this? Is there any obstacle from putting anything in docker? In my limited experience docker images can get the user up and running in a matter of minutes without any overhead in thinking OS related issues, dependencies, misconfigurations, etc.

I have not build an image myself yet, but it shouldn't be difficult. particularly with tools like neurodocker.

cookpa commented 5 years ago

I don't have a Docker yet but I made a Singularity recipe

https://github.com/cookpa/ANTsRSingularity

stnava commented 5 years ago

been around since summer 2017 https://github.com/stnava/ANTsRDocker

stnava commented 5 years ago

also: https://rstudio.cloud/project/38492

which is out of date as well.

dorianps commented 5 years ago

also: https://rstudio.cloud/project/38492

which is out of date as well.

Checked that few days ago, doesn't work, it complained something about ANTsRCore.

Is the ANTsR docker image somewhere (docker hub?) or does it need a build?

Short story, I am looking to perhaps build an image with LESYMAP/ANTsR/ANTsRCore/ITKR.

stnava commented 5 years ago

https://hub.docker.com/r/stnava/antsr/ again 2 years old

stnava commented 5 years ago

also - the cloud version does work, at least when i've tried it. "not working" seems very unlikely since it's just a docker container.

dorianps commented 5 years ago
> library(ANTsR)
Error in library(ANTsR) : there is no package called ‘ANTsR’
> .libPaths('/cloud/project/RL/')
> library(ANTsR)
Loading required package: ANTsRCore
Error: package or namespace load failed for ‘ANTsRCore’:
 package ‘ANTsRCore’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version
Error: package ‘ANTsRCore’ could not be loaded

image

stnava commented 5 years ago

wrong R version relative to the source. try R version 3.4.x

stnava commented 5 years ago

upper right corner.

dorianps commented 5 years ago

Got it, I managed to install devtools and LESYMAP as well, although example(lesymap) which normally takes 1 minute leads to an R crash.

In general it would be great to have a recent docker image and perhaps add docker hub tags every new github tag.

stnava commented 5 years ago

that would be nice.

brian

On Wed, Mar 20, 2019 at 5:40 PM dorianps notifications@github.com wrote:

Got it, I managed to install devtools and LESYMAP as well, although example(lesymap) which normally takes 1 minute leads to an R crash.

In general it would be great to have a recent docker image and perhaps add docker hub tags every new github tag.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ANTsX/ANTsR/issues/265#issuecomment-475039441, or mute the thread https://github.com/notifications/unsubscribe-auth/AATyfjhuhc8d6dU5_ZwXBwkwHK-eo2xjks5vYqrSgaJpZM4cACcD .

stnava commented 5 years ago

here is the latest Dockerfile : https://github.com/stnava/ANTsRDocker it is not pushed to hub - I have not found adequate wireless bandwidth to make a successful push .... it can be used in https://mybinder.org though

dorianps commented 4 years ago

An update on docker efforts:

I have created an ANTsR docker image here: https://hub.docker.com/r/dorianps/antsr/tags

I wanted to share a couple of thoughts/questions on the docker image.

The docker image:

The image I build is based on rocker/rstudio and contains a fresh build of ANTsR using devtools. This guarantees we build with the latest changes everywhere (ANTsR, ANTsRCore, ITKR, ANTs), for example the latest ANTs bug fix by @cookpa should be incorporated. We also don't need to track the dependencies that are needed, we can just change dependencies in one of the packages and they are automatically reflected in the docker build. Looks like the ANTsRDocker by @stnava uses binary installs, so they will be behind with the latest fixes. In terms of size, the base image rocker/rstudio is much lighter than the one used by @stnava rocker/binder. For this, I end up with a docker image of 2.7Gb as opposed to 7Gb with @stnava solution. And of course, I hope the idea is we provide the minimum environment required to run ANTsR and install additional packages. Since devtools is already in the environment, one can install other things on top (i.e., ANTsRNet etc.). This can be done on the fly once the container is running, or we can build extra images for the layers covering ANTsR, this is what I am doing for LINDA and LESYMAP.

Keeping consistent tagging:

For normal software, people tag by version. But here we have all sorts of depndencies and makes little sense to tag by ANTsR version on an ongoing basis. Changes can happen in ANTsRCore or ITKR that are not reflected in ANTsR commits, and yet the ANTsR package has changed. So I propose we use current build dates for tagging docker images. Once R starts within the container, you should see the installed commit for each software, which can help us troubleshoot things if needed.

 package   * version date       lib source                          
 ANTsR       0.5.4   2019-10-29 [1] Github (ANTsX/ANTsR@e87caa4)    
 ANTsRCore   0.7.1   2019-10-29 [1] Github (ANTsX/ANTsRCore@9e17884)
 ITKR        0.5.1.2 2019-10-29 [1] Github (stnava/ITKR@2c73cf9)    

[1] /usr/local/lib/R/site-library
[2] /usr/local/lib/R/library
 package * version date       lib source
 LINDA   * 0.5.1   2019-10-30 [1] local 

[1] /usr/local/lib/R/site-library
[2] /usr/local/lib/R/library

Autobuilds

Dockerhub offers automated image creation by tracking Github commits. This is not feasible for our style of work because commits can happen in ANTsR, ANTsRCore, or ITKR, and sometimes these commits are work in progress and the three components may be out of sync and fail the installation. I think the best would be to run a cron job and post docker images weekly or monthly. I can do that for now, but it might be better we keep a single common docker file in ANTsRDocker (or ANTsR itself) where everyone is able to perform pull requests to further refine the dockerfile, and then we use that dockerfile to somewhat be able build and push in docker hub. I can also make a single bash script with the docker file incorporated, which can run on any machine to build the docker image.

That's it for now. Happy to hear your thoughts. If anyone wants to try the docker image I built:

MYPASSWORD=mesi3 # set your password
MYDATA=/DATA/dorian # point to your data folder
LOCALPORT=8787

docker container run -e PASSWORD=$MYPASSWORD \
  -v $MYDATA:/home/rstudio/mydata \
  -p $LOCALPORT:8787 \
  --rm dorianps/antsr:latest

Then open your browser and go to http://localhost:8787 (username rstudio, pass mesi3). I can confirm the image works on Windows docker as well, I was able to run a heavy LINDA automated lesion segmentation on Windows (although there is some clear mis-management of memory by Rscript which does not happen in R itself).

dorianps commented 4 years ago

Forgot to mention, dockerhub also provides a link to trigger a build. Not sure if that is another way we can take advantage of using their servers without any need on our side but clicking a link. I have not tested the link method.

muschellij2 commented 4 years ago

Great resource. One point - "For normal software, people tag by version. But here we have all sorts of depndencies and makes little sense to tag by ANTsR version on an ongoing basis. " - I disagree completely and argue that pushing for more consistent versioning is the answer. Best, John

On Wed, Oct 30, 2019 at 11:29 AM dorianps notifications@github.com wrote:

An update on docker efforts:

I have created an ANTsR docker image here: https://hub.docker.com/r/dorianps/antsr/tags

I wanted to share a couple of thoughts/questions on the docker image. The docker image:

The image I build is based on rocker/rstudio and contains a fresh build of ANTsR using devtools. This guarantees we build with the latest changes everywhere (ANTsR, ANTsRCore, ITKR, ANTs), for example the latest bug fix by @cookpa https://github.com/cookpa . We also don't need to track the dependencies that are needed, we can just change dependencies in one of the packages and they are automatically reflected in the docker build. Looks like the ANTsRDocker by @stnava https://github.com/stnava uses binary installs, so they will be behind with the latest fixes. In terms of size, the base image rocker/rstudio is much lighter than the one used by @stnava https://github.com/stnava rocker/binder. For this, we end up with an antsr docker image with 2.7Gb in my solution as opposed to 7Gb at @stnava https://github.com/stnava solution. And of course, I hope the idea is we provide the minimum environment required to run ANTsR and install additional packages. Since devtools is already in the environment, one can install other things on top (i.e., ANTsRNet etc.). This can be done on the fly once the container is running, or we can build extra images for the layers covering ANTsR, this is what I am doing for LINDA and LESYMAP. Keeping consistent tagging:

For normal software, people tag by version. But here we have all sorts of depndencies and makes little sense to tag by ANTsR version on an ongoing basis. Changes can happen in ANTsRCore or ITKR that are not reflected in ANTsR commits, and yet the ANTsR package has changed. So I propose we use current build dates for tagging docker images. Once R starts within the container, you should see the installed commit for each software, which can help us troubleshoot things if needed.

package * version date lib source ANTsR 0.5.4 2019-10-29 [1] Github (ANTsX/ANTsR@e87caa4) ANTsRCore 0.7.1 2019-10-29 [1] Github (ANTsX/ANTsRCore@9e17884) ITKR 0.5.1.2 2019-10-29 [1] Github (stnava/ITKR@2c73cf9)

[1] /usr/local/lib/R/site-library [2] /usr/local/lib/R/library package version date lib source LINDA 0.5.1 2019-10-30 [1] local

[1] /usr/local/lib/R/site-library [2] /usr/local/lib/R/library

Autobuilds

Dockerhub offers automated image creation by tracking Github commits. This is not feasible for our style of work because commits can happen in ANTsR, ANTsRCore, or ITKR, and sometimes these commits are work in progress and the three components may be out of sync and fail the installation. I think the best would be to run a cron job and post docker images weekly or monthly. I can do that for now, but it might be better we keep a single common docker file in ANTsRDocker (or ANTsR itself) where everyone is able to perform pull requests to further refine the dockerfile, and then we use that dockerfile to somewhat be able build and push in docker hub. I can also make a single bash script with the docker file incorporated, which can run on any machine to build the docker image.

That's it for now. Happy to hear your thoughts. If anyone wants to try the docker image I built:

MYPASSWORD=mesi3 # set your password MYDATA=/DATA/dorian # point to your data folder LOCALPORT=8787

docker container run -e PASSWORD=$MYPASSWORD \ -v $MYDATA:/home/rstudio/mydata \ -p $LOCALPORT:8787 \ --rm dorianps/antsr:latest

Then open your browser and go to http://localhost:8787 . I can confirm the image works on Windows docker as well, I was able to run a heavy LINDA automated lesion segmentation on Windows (although there is some clear mis-management of memory by Rscript which does not happen in R itself).

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ANTsX/ANTsR/issues/265?email_source=notifications&email_token=AAIGPLWEXDURXEVR6FECNG3QRGR5FA5CNFSM4HAAE4B2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECUUJ4I#issuecomment-547964145, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIGPLRXMYTW3NKPCH4CCN3QRGR5FANCNFSM4HAAE4BQ .

cookpa commented 4 years ago

This looks really good, thanks for working on it.

Do you think it would be feasible to provide an even smaller image with a run time only environment? I've been reading about layering in containers, where you build everything in one layer, then create another layer that copies what it needs to run the software (ANTsR), but none of the development stuff. But I don't know how well that would work for this project.

dorianps commented 4 years ago

@cookpa I saw something about it and Neurodocker provides some tools to get surgical environments, i.e., only antsRegistration. I have not experimented with that, but from what I understand there is not much room, except:

@muschellij2 Perhaps version tagging might make more sense for official releases. But with the current development pace of these packages, I don't see how that would work.

muschellij2 commented 4 years ago

Essentially there would be rules for pull requests where versions would have To be bumped. Could also be Somewhat similar to ITK as well

On Wed, Oct 30, 2019 at 11:50 AM dorianps notifications@github.com wrote:

@cookpa https://github.com/cookpa I saw something about it and Neurodocker provides some tools to get surgical environments, i.e., only antsRegistration. I have not experimented with that, but from what I understand there is not much room, except:

  • Switch to an r-base environment, which could save 600-700mb. The r-base image starts with 700mb while the rstudio image starts with 1.3Gb.
  • Avoid using or keeping devtools. The dependencies for devtools are not small, but I think it is useful to have everything in one place, devtools and rstudio, this way anyone can run the container and install anything else is needed. I would not favor keeping multiple versions of antsr containers (with and without rstudio), it would make things too complicated.

@muschellij2 https://github.com/muschellij2 Perhaps version tagging might make more sense for official releases. But with the current development page of these packages, I don't see how that would work.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ANTsX/ANTsR/issues/265?email_source=notifications&email_token=AAIGPLUYNAOEJYYM5IOXOLDQRGUNBA5CNFSM4HAAE4B2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECUXCOA#issuecomment-547975480, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIGPLQSSQ6NUU5DU7QTYRLQRGUNBANCNFSM4HAAE4BQ .

-- Best, John

stnava commented 4 years ago

the binder container was used for this reason: https://mybinder.org/v2/gh/stnava/ANTsRDocker/master

which add some size, of course. also tensor flow and Keras are there too .... anyway, perhaps add something to the documentation README.md about this container. it looks reasonable to me.

this package may be of use: https://rstudio.github.io/packrat/

dorianps commented 4 years ago

@stnava do you have thoughts on tagging, i.e., if by date is reasonable enough. John's proposal is fine but would require changes in the way all commits/pull requests are handled.

muratmaga commented 4 years ago

I want to try this, but I am not familiar with the docker. I went as far as installing and running the docker instance (including setting up the password). However, it is not clear what the username should be for the Rstudio login (at 8787). It doesn’t accept my local username or root.

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10


From: dorianps notifications@github.com Sent: Wednesday, October 30, 2019 8:29:23 AM To: ANTsX/ANTsR ANTsR@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [ANTsX/ANTsR] Docker image with ANTsR ready to go? (#265)

An update on docker efforts:

I have created an ANTsR docker image here: https://hub.docker.com/r/dorianps/antsr/tagshttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fhub.docker.com%2Fr%2Fdorianps%2Fantsr%2Ftags&data=02%7C01%7C%7C59d6a7e0b65a4c54195b08d75d4df19c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637080461649965516&sdata=LXYKyehp9BDy0xH%2Fw8ACXxXip2XvtHq0HP13qDvmgMM%3D&reserved=0

I wanted to share a couple of thoughts/questions on the docker image.

The docker image:

The image I build is based on rocker/rstudio and contains a fresh build of ANTsR using devtools. This guarantees we build with the latest changes everywhere (ANTsR, ANTsRCore, ITKR, ANTs), for example the latest bug fix by @cookpahttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcookpa&data=02%7C01%7C%7C59d6a7e0b65a4c54195b08d75d4df19c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637080461649975526&sdata=YeR7NLnvLtFZU2NZ%2FfojeV6a8%2FyYS74T96xDZofBHV4%3D&reserved=0 . We also don't need to track the dependencies that are needed, we can just change dependencies in one of the packages and they are automatically reflected in the docker build. Looks like the ANTsRDocker by @stnavahttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fstnava&data=02%7C01%7C%7C59d6a7e0b65a4c54195b08d75d4df19c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637080461649975526&sdata=SFHUGW%2BNmhqLeE1DR1%2Bf8LvgSiP3by6X2k6alaNcqnY%3D&reserved=0 uses binary installs, so they will be behind with the latest fixes. In terms of size, the base image rocker/rstudio is much lighter than the one used by @stnavahttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fstnava&data=02%7C01%7C%7C59d6a7e0b65a4c54195b08d75d4df19c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637080461649985535&sdata=cPFz7pIpbaCHEL8qsoJs1I0%2FCs0VA3mIyD4R4mVzZ5U%3D&reserved=0 rocker/binder. For this, we end up with an antsr docker image with 2.7Gb in my solution as opposed to 7Gb at @stnavahttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fstnava&data=02%7C01%7C%7C59d6a7e0b65a4c54195b08d75d4df19c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637080461649985535&sdata=cPFz7pIpbaCHEL8qsoJs1I0%2FCs0VA3mIyD4R4mVzZ5U%3D&reserved=0 solution. And of course, I hope the idea is we provide the minimum environment required to run ANTsR and install additional packages. Since devtools is already in the environment, one can install other things on top (i.e., ANTsRNet etc.). This can be done on the fly once the container is running, or we can build extra images for the layers covering ANTsR, this is what I am doing for LINDA and LESYMAP.

Keeping consistent tagging:

For normal software, people tag by version. But here we have all sorts of depndencies and makes little sense to tag by ANTsR version on an ongoing basis. Changes can happen in ANTsRCore or ITKR that are not reflected in ANTsR commits, and yet the ANTsR package has changed. So I propose we use current build dates for tagging docker images. Once R starts within the container, you should see the installed commit for each software, which can help us troubleshoot things if needed.

package * version date lib source ANTsR 0.5.4 2019-10-29 [1] Github (ANTsX/ANTsR@e87caa4) ANTsRCore 0.7.1 2019-10-29 [1] Github (ANTsX/ANTsRCore@9e17884) ITKR 0.5.1.2 2019-10-29 [1] Github (stnava/ITKR@2c73cf9)

[1] /usr/local/lib/R/site-library [2] /usr/local/lib/R/library package version date lib source LINDA 0.5.1 2019-10-30 [1] local

[1] /usr/local/lib/R/site-library [2] /usr/local/lib/R/library

Autobuilds

Dockerhub offers automated image creation by tracking Github commits. This is not feasible for our style of work because commits can happen in ANTsR, ANTsRCore, or ITKR, and sometimes these commits are work in progress and the three components may be out of sync and fail the installation. I think the best would be to run a cron job and post docker images weekly or monthly. I can do that for now, but it might be better we keep a single common docker file in ANTsRDocker (or ANTsR itself) where everyone is able to perform pull requests to further refine the dockerfile, and then we use that dockerfile to somewhat be able build and push in docker hub. I can also make a single bash script with the docker file incorporated, which can run on any machine to build the docker image.

That's it for now. Happy to hear your thoughts. If anyone wants to try the docker image I built:

MYPASSWORD=mesi3 # set your password MYDATA=/DATA/dorian # point to your data folder LOCALPORT=8787

docker container run -e PASSWORD=$MYPASSWORD \ -v $MYDATA:/home/rstudio/mydata \ -p $LOCALPORT:8787 \ --rm dorianps/antsr:latest

Then open your browser and go to http://localhost:8787 . I can confirm the image works on Windows docker as well, I was able to run a heavy LINDA automated lesion segmentation on Windows (although there is some clear mis-management of memory by Rscript which does not happen in R itself).

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FANTsX%2FANTsR%2Fissues%2F265%3Femail_source%3Dnotifications%26email_token%3DAFCMSFFMZ2Z2UAQL5O45KO3QRGR5HA5CNFSM4HAAE4B2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECUUJ4I%23issuecomment-547964145&data=02%7C01%7C%7C59d6a7e0b65a4c54195b08d75d4df19c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637080461649995540&sdata=q5VcTVL1BiK%2B3gXDqFYOVM1xY92cr5Qg81Tap6X1c7Q%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAFCMSFD6NOJ4R7K5CMKNLKTQRGR5HANCNFSM4HAAE4BQ&data=02%7C01%7C%7C59d6a7e0b65a4c54195b08d75d4df19c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637080461649995540&sdata=cMl0NE%2FoOxdXjIgdUTBy1kAldTCaqZS14TV2VdBNcnA%3D&reserved=0.

dorianps commented 4 years ago

If you just copied the command above then: (username rstudio, pass mesi3)

dorianps commented 4 years ago

But that command would fail in Windows Powershell because of line breaks \. This is an example that works for Windows:

docker container run -e PASSWORD=mesi3 -v C:\Users\dp\Desktop\lindaTest\:/home/rstudio/mydata -p 8787:8787 --rm
dorianps/linda:latest
muratmaga commented 4 years ago

I actually ran it like this from powershell docker run dorianps/antsr

I asked me to set up a password, I did. What I didn’t know the username, and now it works perfectly fine as far as I can tell.

Thanks for this. Looks very promising. M

Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10


From: dorianps notifications@github.com Sent: Wednesday, October 30, 2019 11:42:08 AM To: ANTsX/ANTsR ANTsR@noreply.github.com Cc: muratmaga muratmaga@outlook.com; Comment comment@noreply.github.com Subject: Re: [ANTsX/ANTsR] Docker image with ANTsR ready to go? (#265)

But that command would fail in Windows Powershell because of line breaks . This is an example that works for Windows:

docker container run -e PASSWORD=mesi3 -v C:\Users\dp\Desktop\lindaTest\:/home/rstudio/mydata -p 8787:8787 --rm dorianps/linda:latest

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FANTsX%2FANTsR%2Fissues%2F265%3Femail_source%3Dnotifications%26email_token%3DAFCMSFEKLQC6GWJPJZAZ6ZTQRHIP7A5CNFSM4HAAE4B2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECVLDYY%23issuecomment-548057571&data=02%7C01%7C%7C49d67fa1d2df4f18cd6d08d75d68de97%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637080577292366931&sdata=Y2Ik5T4gMNz%2FHcvZceDWztO5BPwLt1rRTth0ZubaaIo%3D&reserved=0, or unsubscribehttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAFCMSFCTM7WV2FST5QOX4L3QRHIP7ANCNFSM4HAAE4BQ&data=02%7C01%7C%7C49d67fa1d2df4f18cd6d08d75d68de97%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637080577292366931&sdata=AomqxPOkORsBbeXB1UwRVbLC4CzQsFeuZ3Bdem2%2FCPA%3D&reserved=0.

stnava commented 4 years ago

one approach to versioning might be to build on ( and repair ) the ANTsVersions.csv ... the ANTsR version csv could also include the ANTsRCore and ITKR core versions that were used to build. not perfect but perhaps better than current state.

dorianps commented 4 years ago

From my understanding:

The problem is not where to keep versions but that commits are made without bumping versions. If ANTsRVersions.csv needs to be maintained with version bumps after each commit, then we could just bump version in DESCRIPTION itself. If bumping versions after each commit (or pull request) is not happening, I find the current git commit in master to be the most informative information on the package version. When I need to go back in time with ANTsR, I typically get specific commits from each package (ANTsR, ANTsCore, ITK) say from 3 months ago so that all three were at that same timepoint regardless of versions; this is why I think it makes sense to tag ANTsR docker images by date.

P.s. An update: docker can do automated builds in the cloud for free, but my building from source is taking too long for the cloud compilation limits. Will see if I can do anything about it, or will use my local computer for docker.

On Thu, Oct 31, 2019 at 2:16 PM stnava notifications@github.com wrote:

one approach to versioning might be to build on ( and repair ) the ANTsVersions.csv ... the ANTsR version csv could also include the ANTsRCore and ITKR core versions that were used to build. not perfect but perhaps better than current state.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ANTsX/ANTsR/issues/265?email_source=notifications&email_token=ACFJU7IRDYVKVUN3ERRYFODQRMOH3A5CNFSM4HAAE4B2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECYYGRQ#issuecomment-548504390, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACFJU7OBNFQQUGRAQCZKA23QRMOH3ANCNFSM4HAAE4BQ .

stnava commented 4 years ago

'versions' and commits are conceptually different things. we dont want to unify the concept for several reasons. primarily, it's against the definition / purpose of versioning.

dorianps commented 4 years ago

Here are some updates.

DockerHub would theoretically work, but the build is too slow and the process is killed after a couple of hours. We could split up the build in 3-4 different images, but I don't like to coordinate multiple image builds.

I have improved the local builds and created some tools for everyone's use. They are in: https://github.com/dorianps/docker/tree/master/antsr

Builds.antsr.* scripts will build the container without any user input in 1-2 hours. While Run.antsr.* scripts will start the container and the browser so the user does not need to deal with commands and parameters.

Both the above is available for Linux and Windows. Windows users can just double click the .bat images and will have a fresh build or run of the container. This means Windows folks can do their work without any help from Linux users.

At the end of the above page there is a command you can run to see what commits are installed in the container.

I will probably add a Wiki page in LESYMAP or ANTsR to explain more of this stuff in detail.

Enjoy.

dorianps commented 4 years ago

I have finished the scripts needed to build and run docker images. https://github.com/dorianps/docker The idea was to build or run docker containers with a single basic command. Currently setting up a crontab in a local server to build and push monthly builds of ANTsR images. Anyone can build and push images on Dockerhub though, all is needed is to change the username inside the script.

Closing the issue as now I think is resolved.

dorianps commented 4 years ago

I ran a test to compare the speed of docker processing vs. Windows Linux Subsystem. WSL is 53% slower than docker. Test explanation here: https://github.com/dorianps/docker/wiki/Windows:-Docker-vs.-WSL-speed-test