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

Fix TensorFlow installation on Debian #1601

Merged
merged 6 commits into from
Feb 15, 2018
Merged

Fix TensorFlow installation on Debian #1601

merged 6 commits into from
Feb 15, 2018

Conversation

perone
Copy link
Contributor

@perone perone commented Feb 14, 2018

This PR is a fix for the Keras/TensorFlow installation on Debian, ref #1599.

@perone perone added the bug category: fixes an error in the code label Feb 14, 2018
@perone perone self-assigned this Feb 14, 2018
@jcohenadad
Copy link
Member

@stephaniealley could you please test this branch on the station you had a problem and add your review this PR? Thanks

@@ -416,6 +416,12 @@ else
and verify your internet connection before reinstalling"
exit $e_status
fi

# Install tensorflow for Debian
if python -c "import platform; print platform.dist()" | grep -qi 'debian'; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this problem specific to debian or to debian-family, i.e., could some older versions of ubuntu experience the same problem?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really hard to tell without testing on older Ubuntu versions. But since Ubuntu is Debian-based, it can happen. However, it is rarer to see older Ubuntu versions, given that this would raise serious security concerns.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having some Ubuntu containers floating around, I tested this:

('Ubuntu', '16.04', 'xenial')
('Ubuntu', '18.04', 'bionic')

Now, as for debian, the test could probe for the older version, because eg. debian 8 (jessie) ships with glibc 2.19, and doesn't need to use the old tensorflow:

>>> import tensorflow as tf
>>> import platform; print platform.dist()
('debian', '8.10', '')
>>> import sys
>>> sys.executable
'/home/cJ/miniconda2/bin/python'
>>> tf.__version__
'1.5.0'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's ok if newer Debian versions use Tensorflow from conda, it will certainly be faster (tensorflow performance on CPU). We need to stick with the TensorFlow 1.3.0 because everyone in the lab is using this version and all our models were validated and developed in this version. There are also breaking API changes in newer TF versions.

@jcohenadad jcohenadad added this to the 3.1.1 milestone Feb 14, 2018
@jcohenadad jcohenadad added the installation category: install_sct or pip/setup.py label Feb 14, 2018
Copy link
Contributor

@stephaniealley stephaniealley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes the problem. I tested sct_deepseg_sc and sct_deepseg_gm after installation, and they both ran successfully.

@jcohenadad
Copy link
Member

@stephaniealley please run

sct_testing

@stephaniealley
Copy link
Contributor

@jcohenadad I ran sct_testing, and everything passed.

@jcohenadad jcohenadad merged commit 8c232e3 into master Feb 15, 2018
@jcohenadad jcohenadad deleted the feature_tf_debian branch February 15, 2018 01:37
jcohenadad added a commit that referenced this pull request Feb 16, 2018
* 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
jcohenadad added a commit that referenced this pull request Dec 18, 2019
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug category: fixes an error in the code installation category: install_sct or pip/setup.py
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants