SingularityでalpineベースのBlast+コンテナを作ろうと思ったんですが、ハマったのでメモ。
Alpine LinuxへBlast+をインストールする手順
1. glibcのインストール
Blast+はglibc前提の実装になっているらしく、musl-libcを使うようになっているAlpine Linuxでそのまま実行しようとするとnot found
になります。
そこで、まずはglibcをインストールします。
apk --update --no-cache add --virtual=.build-deps ca-certificates wget
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://raw.githubusercontent.com/sgerrand/alpine-pkg-glibc/master/sgerrand.rsa.pub
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.27-r0/glibc-2.27-r0.apk
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.27-r0/glibc-bin-2.27-r0.apk
apk --no-cache add -v glibc-2.27-r0.apk
apk --no-cache add -v glibc-bin-2.27-r0.apk
2. Blast+のダウンロード
Blast+は、https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/ からビルド済みのものをダウンロードします。
wget https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.4.0/ncbi-blast-2.4.0+-x64-linux.tar.gz
tar xfvz ncbi-blast-2.4.0+-x64-linux.tar.gz
mv ncbi-blast-2.4.0+/bin/* /usr/local/bin/
以上の操作で、Alpine Linux上でBlast+が動作するようになります。