soedinglab / MMseqs2-App

MMseqs2 app to run on your workstation or servers
https://search.foldseek.com
GNU General Public License v3.0
55 stars 18 forks source link

docker-compose run db-setup XXX fails due to no space left on device #92

Open JackKay404 opened 1 month ago

JackKay404 commented 1 month ago

When running the automatic database setup using docker-compose run db-setup as in the README.md the download is terminated prematurely with some text output stating for ecample:

Cannot write to '/tmp/12645459548716115717/highquality_clust30_ca' (No space left on device).

This is caused because the download script stores files in the /tmp directory of the container and docker's default maximum tmpfs size being 50 % of the RAM available on the host machine (which in my case was 32 G).

As stated in the docker documentation when using docker run you can control the upper limit of the tmpfs mount using the --tmpfs-size option however in docker-compose this can be set like:

tmpfs:
      - /tmp:exec,size=200G

This however did not work for me, the container crashed every time I tried. Instead the workaround I used was to simply change the directory the downloads were sent to from /tmp to /downloads, lines 11 and 15 of setup_db.sh setup_db.sh Line 11

    "${APP}" databases "${DB}" "/opt/mmseqs-web/databases/${SAFE}" /downloads || continue

setup_db.sh Line 15

    "${APP}" createindex "/opt/mmseqs-web/databases/${SAFE}" /downloads --split 1

Maybe someone else has a more elegant solution?