Skip to content

Commit

Permalink
Uses pip install to install pydeface.
Browse files Browse the repository at this point in the history
The advantage is that the dependent packages are installed in full, rather than zipped, so we can later uninstall those not needed, or remove `test` folders from those packages, to reduce image size.
  • Loading branch information
pvelasco committed Nov 6, 2019
1 parent 895fa93 commit e40c041
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,8 @@ ENV PYDEFACE_VERSION=2.0.0
# to 'root').
# My solution is to add the flag "zip_safe=False" to setup.py

RUN cd /tmp && \
mkdir pydeface && \
curl -sSL https://github.com/poldracklab/pydeface/archive/${PYDEFACE_VERSION}.tar.gz \
| tar -vxz -C pydeface --strip-components=1 && \
cd pydeface && \
sed -i -e "s/which('fsl')/which('flirt')/" pydeface/utils.py && \
sed -i -e "s/\([ ]*\)package_data=[a-zA-Z0-9]*,$/&\n\1zip_safe=False,/" setup.py && \
easy_install -Z ./ && \
cd / && rm -rf /tmp/pydeface
RUN pip install pydeface==${PYDEFACE_VERSION} && \
sed -i -e "s/which('fsl')/which('flirt')/" ${PYTHON_LIB_PATH}/site-packages/pydeface/utils.py


### Clean up a little ###
Expand Down

0 comments on commit e40c041

Please sign in to comment.