Closed Remi-Gau closed 1 month ago
closes #68
with this
docker run --rm repronim/neurodocker:0.9.5 generate docker \
--base-image bids/base_validator:1.11.0 \
--yes \
--pkg-manager apt \
--install git num-utils gcc g++ curl build-essential nano\
--miniconda \
version=latest \
conda_install="python=3.10 numpy nipype nibabel pandas datalad git-annex" \
pip_install="deepdefacer scikit-learn tensorflow scikit-image pydeface==2.0.2 nobrainer==0.4.0 quickshear==1.2.0 datalad-osf" \
--run-bash "mkdir -p /opt/nobrainer/models && cd /opt/nobrainer/models && datalad clone https://github.com/neuronets/trained-models && cd trained-models && git-annex enableremote osf-storage && datalad get -s osf-storage ." \
--run-bash "git clone https://github.com/mih/mridefacer" \
--env MRIDEFACER_DATA_DIR=/mridefacer/data \
--run-bash "mkdir /home/mri-deface-detector && cd /home/mri-deface-detector && npm install sharp --unsafe-perm && npm install -g mri-deface-detector --unsafe-perm && cd ~" \
--run-bash "git clone https://github.com/miykael/gif_your_nifti && cd gif_your_nifti && source activate bidsonym && python setup.py install" \
--fsl version=6.0.6.4 method=binaries \
--copy . /home/bm \
--run-bash "chmod a+x /home/bm/bidsonym/fs_data/mri_deface" \
--run-bash "source activate bidsonym && cd /home/bm && pip install -e ." \
--env IS_DOCKER=1 \
--workdir '/tmp/' \
--entrypoint "/neurodocker/startup.sh bidsonym"
we get:
#0 2681.5 Collecting sklearn (from deepdefacer)
#0 2681.5 Downloading sklearn-0.0.post5.tar.gz (3.7 kB)
#0 2681.5 Preparing metadata (setup.py): started
#0 2681.7 Preparing metadata (setup.py): finished with status 'error'
#0 2681.7 error: subprocess-exited-with-error
#0 2681.7
#0 2681.7 × python setup.py egg_info did not run successfully.
#0 2681.7 │ exit code: 1
#0 2681.7 ╰─> [18 lines of output]
#0 2681.7 The 'sklearn' PyPI package is deprecated, use 'scikit-learn'
#0 2681.7 rather than 'sklearn' for pip commands.
#0 2681.7
#0 2681.7 Here is how to fix this error in the main use cases:
#0 2681.7 - use 'pip install scikit-learn' rather than 'pip install sklearn'
#0 2681.7 - replace 'sklearn' by 'scikit-learn' in your pip requirements files
#0 2681.7 (requirements.txt, setup.py, setup.cfg, Pipfile, etc ...)
#0 2681.7 - if the 'sklearn' package is used by one of your dependencies,
#0 2681.7 it would be great if you take some time to track which package uses
#0 2681.7 'sklearn' instead of 'scikit-learn' and report it to their issue tracker
#0 2681.7 - as a last resort, set the environment variable
#0 2681.7 SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True to avoid this error
#0 2681.7
#0 2681.7 More information is available at
#0 2681.7 https://github.com/scikit-learn/sklearn-pypi-package
#0 2681.7
#0 2681.7 If the previous advice does not cover your use case, feel free to report it at
#0 2681.7 https://github.com/scikit-learn/sklearn-pypi-package/issues/new
#0 2681.7 [end of output]
#0 2681.7
#0 2681.7 note: This error originates from a subprocess, and is likely not a problem with pip.
#0 2681.7 error: metadata-generation-failed
#0 2681.7
#0 2681.7 × Encountered error while generating package metadata.
#0 2681.7 ╰─> See above for output.
#0 2681.7
#0 2681.7 note: This is an issue with the package mentioned above, not pip.
#0 2681.7 hint: See above for details.
------
ERROR: failed to solve: executor failed running [/bin/sh -c apt-get update -qq && apt-get install -y -q --no-install-recommends bzip2 ca-certificates curl && rm -rf /var/lib/apt/lists/* && export PATH="/opt/miniconda-latest/bin:$PATH" && echo "Downloading Miniconda installer ..." && conda_installer="/tmp/miniconda.sh" && curl -fsSL -o "$conda_installer" https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && bash "$conda_installer" -b -p /opt/miniconda-latest && rm -f "$conda_installer" && conda update -yq -nbase conda && conda config --system --prepend channels conda-forge && conda config --set channel_priority strict && conda config --system --set auto_update_conda false && conda config --system --set show_channel_urls true && conda init bash && conda install -y --name base "python=3.10" "numpy" "nipype" "nibabel" "pandas" "datalad" "git-annex" && bash -c "source activate base && python -m pip install --no-cache-dir "deepdefacer" "scikit-learn" "tensorflow" "scikit-image" "pydeface==2.0.2" "nobrainer==0.4.0" "quickshear==1.2.0" "datalad-osf"" && sync && conda clean --all --yes && sync && rm -rf ~/.cache/pip/*]: exit code: 1
seems deepfacer is using an antiquated version of scikit-learn
Hey @Remi-Gau -- did you approach this since then or what do you use for your defacing needs these days? ;-)
nope: not retried
Hi @Remi-Gau,
are you in CET or EST right now? We could chat one of these, as I would also like to solve and ideally move this to workflows. Otherwise during the brainhack (virtually or in-person)?
Thanks!
Cheers, Peer
Brussel based. Could chat during the OHBM period.