-
-
Notifications
You must be signed in to change notification settings - Fork 101
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 minimal Dockerfile for SCT. #1600
Conversation
Yeah, could be useful, eg. for #1599. You're stating "minimal" but have you tried Ubuntu Core 2016? |
I also think it could be useful for the #1599. I haven't tried Ubuntu Core 2016 but I guess it wouldn't work due to the number of dependencies in SCT, however, I don't have too much time to give it a try right now. |
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.
Have you looked into the repo https:/neuropoly/docker
?
RUN apt-get update && apt-get install -y wget unzip git bzip2 | ||
RUN wget https:/neuropoly/spinalcordtoolbox/archive/master.zip | ||
RUN unzip master.zip | ||
WORKDIR spinalcordtoolbox-master |
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.
A comment on how run commands. Each time RUN
is called, a new volume is created. What I suggest is to move WORKDIR
above the RUN
command. And merge all the run commands into 1 RUN
command.
RUN apt-get update && \
apt-get install -y wget unzip git bzip2 && \
wget https:/neuropoly/spinalcordtoolbox/archive/master.zip && \
unzip master.zip && \
...
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.
You mean layer ? Docker isn't going to create volumes every time RUN
is called. When the RUN
is executed, another layer is created on the top of the previous one. Since Docker uses Copy on Write (CoW), in this case, the final image size will be the same, so in my opinion, there will be no gains in merging all RUN
commands together except for making it harder to read. I can merge them if you want, but I don't think it will be better though.
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.
Correction, you are right, it creates a new layer with each run
. It is a question of best practice. But, it seams that it sounds like it is a duplicate of https:/neuropoly/docker , am I wrong?
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 wasn't able to find an Ubuntu Dockerfile at https:/neuropoly/docker, only a Debian image based on the Neurodebian. Let me know if you guys want me to close this PR without merging.
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.
no, i like the idea of having a container inside SCT repos, so i would keep this PR.
we need, however to associate a documentation with it, so that people know it exists and what to do with it.
this repos: https:/neuropoly/docker is made for the lab in general, not specific to SCT, so it might become messy at some point, without commit regulations, etc.
* jca-release: (88 commits) updated CHANGES.md Adding minimal Dockerfile for SCT. (#1600) Added a study in SCT applications section Fix TensorFlow installation on Debian (#1601) BUG: Fixed a small bug on None condition (#1594) Update deepseg_sc folder --> Add README.txt (#1598) Fixing links to the models. (#1596) DEV: Add Alternative mirror sct_deepseg_gm implementation (#1564) DEV: Modify install_sct to download the deepesg models DEV: rename API folder DEV: changes on the testing function DEV: update OSF link DEV: renaming functions DEV: Correction of the usage.set_description DEV: fill z_holes DEV: modify default features param DEV: NN architecture in spinalcordtoolbox folder DEV: New NN architecture DEV: No need for the prediction ... # Conflicts: # dev/GM_atlas/concatenate_WM_and_GM_tracts.py # dev/GM_atlas/registration_gm_atlas.py # dev/atlas/create_atlas/create_masks_csf_and_gm.py # dev/atlas/validate_atlas/compute_dice.py # dev/atlas/validate_atlas/compute_fractional_volume_per_label.py # dev/atlas/validate_atlas/crop_image.py # dev/atlas/validate_atlas/generate_phantom.py # dev/atlas/validate_atlas/plot_abs_error_vs_csf_values.py # dev/atlas/validate_atlas/plot_abs_error_vs_fractional_volume.py # dev/atlas/validate_atlas/plot_auto_vs_manual.py # dev/atlas/validate_atlas/plot_map.py # dev/atlas/validate_atlas/plot_snr_and_tracts_std.py # dev/atlas/validate_atlas/validate_atlas.py # dev/control_points/make_centerline.py # dev/control_points/process.py # dev/control_points/processjeudi.py # dev/control_points/sct_utils.py # dev/control_points/segall.py # dev/control_points/smoothall.py # dev/control_points/splines_approximation_v2.py # dev/control_points/straighten.py # dev/control_points/test.py # dev/denoise/ornlm/setup.py # dev/generate_ml_data.py # dev/githook/pre_commit_hook.py # dev/itk_transfo/mat_to_displacement.py # dev/sct_detect_spinalcord/sct_detect_spinalcord.py # dev/sct_detect_spinalcord/sct_get_centerline_automatic.py # dev/sct_detect_spinalcord/sct_get_centerline_from_labels.py # dev/sct_dmri_moco__old.py # dev/sct_nin_convert_dcm2nii.py # dev/sct_register_graymatter/sct_register_graymatter.py # dev/sct_register_graymatter/sct_register_graymatter_old.py # dev/sct_register_graymatter/test_sct_register_graymatter.py # dev/sct_register_spine_straightened_to_template.py # dev/sct_register_straight_spinalcord_to_template.py # dev/sct_resample/sct_resample_new.py # dev/sct_resample/sct_resample_old.py # dev/sct_scad.py # dev/sct_segment_gray_matter_asman/2015-07-13_full_scripts_with_Old_unused_functions/sct_segment_graymatter.py # dev/sct_segment_gray_matter_asman/2015-08-17-full_scripts_before_cleaning/sct_segment_graymatter.py # dev/sct_segment_gray_matter_asman/2015-08-17-full_scripts_before_cleaning/sct_segment_graymatter_old.py # dev/sct_smooth_spinal_cord__ISABELLE.py # dev/spinal_level/sct_extract_spinal_levels.py # dev/straightening/optimize_straightening.py # dev/straightening/sct_straighten_spinalcord_LargeFOVOutput.py # dev/tamag/copydiffe.py # dev/tamag/create_generation_info_files.py # dev/tamag/make_warp_null.py # dev/tamag/old/add_noise.py # dev/tamag/old/create_line_on_slice.py # dev/tamag/old/curveSmoothing.py # dev/tamag/old/extract_sagitale.py # dev/tamag/old/get_warping_field.py # dev/tamag/old/msct_get_centerline_from_labels.py # dev/tamag/old/msct_register_reg.py # dev/tamag/old/pipeline_marseille.py # dev/tamag/old/pipeline_preprocessing.py # dev/tamag/old/pipeline_preprocessing_T1.py # dev/tamag/old/pipeline_preprocessing_after_segmentation.py # dev/tamag/old/pipeline_segmentation_T2.py # dev/tamag/old/pipeline_template.py # dev/tamag/old/pipeline_template_T1.py # dev/tamag/old/pipeline_template_T1_from_T2.py # dev/tamag/old/preprocess_data_T1.py # dev/tamag/old/preprocess_data_T2.py # dev/tamag/old/rename_all.py # dev/tamag/old/sct_addlabel.py # dev/tamag/old/sct_denoising_nlm.py # dev/tamag/old/sct_denoizing_nlm.py # dev/tamag/old/sct_function_preprocessing.py # dev/tamag/old/sct_get_centerline_from_labels2.py # dev/tamag/old/test_class_extract_cent.py # dev/tamag/old/test_denoizing_dipy.py # dev/tamag/old/test_filtering.py # dev/tamag/rename_all.py # dev/tamag/test_msct_image.py # dev/tamag/test_msct_register # dev/tamag/test_msct_register.py # dev/tamag/test_register_landmarks_for_images.py # dev/template/pipeline_template_2.py # dev/template_creation/sct_average_levels.py # dev/template_creation/sct_change_file_type.py # dev/template_creation/sct_generate_centerline.py # dev/template_creation/sct_normalize.py # dev/template_creation/sct_push_into_template_space.py # dev/template_creation/sct_symetrize.py # dev/template_creation/sct_template_crop_data.py # dev/template_preprocessing/README.md # dev/wt_scripts/sct_icv_RBM.py # dev/wt_scripts/sct_manage_dicom.py
* jca-release: (88 commits) updated CHANGES.md Adding minimal Dockerfile for SCT. (#1600) Added a study in SCT applications section Fix TensorFlow installation on Debian (#1601) BUG: Fixed a small bug on None condition (#1594) Update deepseg_sc folder --> Add README.txt (#1598) Fixing links to the models. (#1596) DEV: Add Alternative mirror sct_deepseg_gm implementation (#1564) DEV: Modify install_sct to download the deepesg models DEV: rename API folder DEV: changes on the testing function DEV: update OSF link DEV: renaming functions DEV: Correction of the usage.set_description DEV: fill z_holes DEV: modify default features param DEV: NN architecture in spinalcordtoolbox folder DEV: New NN architecture DEV: No need for the prediction ... # Conflicts: # dev/GM_atlas/concatenate_WM_and_GM_tracts.py # dev/GM_atlas/registration_gm_atlas.py # dev/atlas/create_atlas/create_masks_csf_and_gm.py # dev/atlas/validate_atlas/compute_dice.py # dev/atlas/validate_atlas/compute_fractional_volume_per_label.py # dev/atlas/validate_atlas/crop_image.py # dev/atlas/validate_atlas/generate_phantom.py # dev/atlas/validate_atlas/plot_abs_error_vs_csf_values.py # dev/atlas/validate_atlas/plot_abs_error_vs_fractional_volume.py # dev/atlas/validate_atlas/plot_auto_vs_manual.py # dev/atlas/validate_atlas/plot_map.py # dev/atlas/validate_atlas/plot_snr_and_tracts_std.py # dev/atlas/validate_atlas/validate_atlas.py # dev/control_points/make_centerline.py # dev/control_points/process.py # dev/control_points/processjeudi.py # dev/control_points/sct_utils.py # dev/control_points/segall.py # dev/control_points/smoothall.py # dev/control_points/splines_approximation_v2.py # dev/control_points/straighten.py # dev/control_points/test.py # dev/denoise/ornlm/setup.py # dev/generate_ml_data.py # dev/githook/pre_commit_hook.py # dev/itk_transfo/mat_to_displacement.py # dev/sct_detect_spinalcord/sct_detect_spinalcord.py # dev/sct_detect_spinalcord/sct_get_centerline_automatic.py # dev/sct_detect_spinalcord/sct_get_centerline_from_labels.py # dev/sct_dmri_moco__old.py # dev/sct_nin_convert_dcm2nii.py # dev/sct_register_graymatter/sct_register_graymatter.py # dev/sct_register_graymatter/sct_register_graymatter_old.py # dev/sct_register_graymatter/test_sct_register_graymatter.py # dev/sct_register_spine_straightened_to_template.py # dev/sct_register_straight_spinalcord_to_template.py # dev/sct_resample/sct_resample_new.py # dev/sct_resample/sct_resample_old.py # dev/sct_scad.py # dev/sct_segment_gray_matter_asman/2015-07-13_full_scripts_with_Old_unused_functions/sct_segment_graymatter.py # dev/sct_segment_gray_matter_asman/2015-08-17-full_scripts_before_cleaning/sct_segment_graymatter.py # dev/sct_segment_gray_matter_asman/2015-08-17-full_scripts_before_cleaning/sct_segment_graymatter_old.py # dev/sct_smooth_spinal_cord__ISABELLE.py # dev/spinal_level/sct_extract_spinal_levels.py # dev/straightening/optimize_straightening.py # dev/straightening/sct_straighten_spinalcord_LargeFOVOutput.py # dev/tamag/copydiffe.py # dev/tamag/create_generation_info_files.py # dev/tamag/make_warp_null.py # dev/tamag/old/add_noise.py # dev/tamag/old/create_line_on_slice.py # dev/tamag/old/curveSmoothing.py # dev/tamag/old/extract_sagitale.py # dev/tamag/old/get_warping_field.py # dev/tamag/old/msct_get_centerline_from_labels.py # dev/tamag/old/msct_register_reg.py # dev/tamag/old/pipeline_marseille.py # dev/tamag/old/pipeline_preprocessing.py # dev/tamag/old/pipeline_preprocessing_T1.py # dev/tamag/old/pipeline_preprocessing_after_segmentation.py # dev/tamag/old/pipeline_segmentation_T2.py # dev/tamag/old/pipeline_template.py # dev/tamag/old/pipeline_template_T1.py # dev/tamag/old/pipeline_template_T1_from_T2.py # dev/tamag/old/preprocess_data_T1.py # dev/tamag/old/preprocess_data_T2.py # dev/tamag/old/rename_all.py # dev/tamag/old/sct_addlabel.py # dev/tamag/old/sct_denoising_nlm.py # dev/tamag/old/sct_denoizing_nlm.py # dev/tamag/old/sct_function_preprocessing.py # dev/tamag/old/sct_get_centerline_from_labels2.py # dev/tamag/old/test_class_extract_cent.py # dev/tamag/old/test_denoizing_dipy.py # dev/tamag/old/test_filtering.py # dev/tamag/rename_all.py # dev/tamag/test_msct_image.py # dev/tamag/test_msct_register # dev/tamag/test_msct_register.py # dev/tamag/test_register_landmarks_for_images.py # dev/template/pipeline_template_2.py # dev/template_creation/sct_average_levels.py # dev/template_creation/sct_change_file_type.py # dev/template_creation/sct_generate_centerline.py # dev/template_creation/sct_normalize.py # dev/template_creation/sct_push_into_template_space.py # dev/template_creation/sct_symetrize.py # dev/template_creation/sct_template_crop_data.py # dev/template_preprocessing/README.md # dev/wt_scripts/sct_icv_RBM.py # dev/wt_scripts/sct_manage_dicom.py Former-commit-id: f709a6f
Minimal Dockerfile for SCT w/ Ubuntu 16.04
This is just a minimal Dockerfile for SCT w/ Ubuntu 16.04. I made for myself but it might be useful for other people when they cannot run SCT on their platform.