google-deepmind / alphafold

Open source code for AlphaFold 2.
Apache License 2.0
12.91k stars 2.29k forks source link

'Directory not empty' during Docker build #64

Closed RJ3 closed 3 years ago

RJ3 commented 3 years ago

During the docker build I get errors (see bottom) while trying to remove /tmp/hh-suite/

This is very strange to me, because usually 'rm -rf' works on directories that contain files. However if anyone else encounters the same problem as me, it may be worthwhile changing:
rm -rf /tmp/hh-suite
to:
rmdir --ignore-fail-on-non-empty /tmp/hh-suite

ERRORS:

rm: cannot remove '/tmp/hh-suite/.git/info': Directory not empty
rm: cannot remove '/tmp/hh-suite/.git/logs/refs/remotes/origin': Directory not empty
rm: cannot remove '/tmp/hh-suite/.git/objects/pack': Directory not empty
rm: cannot remove '/tmp/hh-suite/.git/refs/remotes/origin': Directory not empty
rm: cannot remove '/tmp/hh-suite/.github': Directory not empty
rm: cannot remove '/tmp/hh-suite/cmake': Directory not empty
rm: cannot remove '/tmp/hh-suite/data': Directory not empty
rm: cannot remove '/tmp/hh-suite/lib/ffindex/src/ext': Directory not empty
rm: cannot remove '/tmp/hh-suite/lib/ffindex/src/mpq': Directory not empty
rm: cannot remove '/tmp/hh-suite/lib/simd': Directory not empty
rm: cannot remove '/tmp/hh-suite/lib/simde/simde/arm/neon': Directory not empty
rm: cannot remove '/tmp/hh-suite/lib/simde/simde/x86': Directory not empty
rm: cannot remove '/tmp/hh-suite/scripts/hhpred/bin': Directory not empty
rm: cannot remove '/tmp/hh-suite/scripts/hhpred/dependencies/modeller_cuser': Directory not empty
rm: cannot remove '/tmp/hh-suite/scripts/hhpred/example': Directory not empty
rm: cannot remove '/tmp/hh-suite/scripts/hhpred/lib/Class': Directory not empty
rm: cannot remove '/tmp/hh-suite/scripts/hhpred/share/distancethreshold': Directory not empty
rm: cannot remove '/tmp/hh-suite/scripts/hhpred/share/neural-net/onhold': Directory not empty
rm: cannot remove '/tmp/hh-suite/src/cs': Directory not empty
The command '/bin/bash -c cmake -DCMAKE_INSTALL_PREFIX=/opt/hhsuite ..     && make -j 4 && make install     && ln -s /opt/hhsuite/bin/* /usr/bin     && rm -rf /tmp/hh-suite' returned a non-zero code: 1

https://github.com/deepmind/alphafold/blob/0bab1bf84d9d887aba5cfb6d09af1e8c3ecbc408/docker/Dockerfile#L42

tomwardio commented 3 years ago

Thank you for reporting this error, we believe this might have been todo with hh-suite being split over two layers. This commit will hopefully remedy this issue.