Skip to content

Commit

Permalink
Fix backend docker container again
Browse files Browse the repository at this point in the history
  • Loading branch information
milot-mirdita committed Jul 3, 2024
1 parent d1f441e commit 6d7d515
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions Dockerfile.backend
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@ ARG FRONTEND_APP
ARG downloader=${FRONTEND_APP}_downloader

FROM scratch as mmseqs_downloader
ONBUILD ADD https://mmseqs.com/latest/mmseqs-linux-avx2.tar.gz /download
ONBUILD ADD https://mmseqs.com/latest/mmseqs-linux-sse41.tar.gz /download
ONBUILD ADD https://mmseqs.com/latest/mmseqs-linux-sse2.tar.gz /download
ONBUILD ADD https://mmseqs.com/latest/mmseqs-linux-arm64.tar.gz /download
WORKDIR /opt/build
ONBUILD ADD https://mmseqs.com/latest/mmseqs-linux-avx2.tar.gz .
ONBUILD ADD https://mmseqs.com/latest/mmseqs-linux-sse41.tar.gz .
ONBUILD ADD https://mmseqs.com/latest/mmseqs-linux-sse2.tar.gz .
ONBUILD ADD https://mmseqs.com/latest/mmseqs-linux-arm64.tar.gz .

FROM scratch as foldseek_downloader
ONBUILD ADD https://mmseqs.com/foldseek/foldseek-linux-avx2.tar.gz /download
#ONBUILD ADD https://mmseqs.com/foldseek/foldseek-linux-sse41.tar.gz /download
ONBUILD ADD https://mmseqs.com/foldseek/foldseek-linux-sse2.tar.gz /download
ONBUILD ADD https://mmseqs.com/foldseek/foldseek-linux-arm64.tar.gz /download
WORKDIR /opt/build
ONBUILD ADD https://mmseqs.com/foldseek/foldseek-linux-avx2.tar.gz .
#ONBUILD ADD https://mmseqs.com/foldseek/foldseek-linux-sse41.tar.gz .
ONBUILD ADD https://mmseqs.com/foldseek/foldseek-linux-sse2.tar.gz .
ONBUILD ADD https://mmseqs.com/foldseek/foldseek-linux-arm64.tar.gz .

FROM $downloader as downloader

Expand All @@ -26,21 +28,21 @@ RUN GOOS=linux GOARCH=$TARGETARCH go build -o mmseqs-web
ADD https://raw.githubusercontent.com/soedinglab/MMseqs2/678c82ac44f1178bf9a3d49bfab9d7eed3f17fbc/util/mmseqs_wrapper.sh binaries/mmseqs
ADD https://raw.githubusercontent.com/steineggerlab/foldseek/0a68e16214a6db745cee783128ccba8546ea5dc9/util/foldseek_wrapper.sh binaries/foldseek

COPY --from=downloader /download .
COPY --from=downloader /opt/build/* .
RUN mkdir binaries; \
if [ "$TARGETARCH" = "arm64" ]; then \
for i in mmseqs foldseek; do \
if [ -e "${i}-linux-arm64.tar.gz" ]; then \
cat ${i}-linux-arm64.tar.gz | tar -xzvf- ${i}/bin/${i}; \
mv ${i}/bin/${i} binaries/${i}; \
mv -f -- ${i}/bin/${i} binaries/${i}; \
fi; \
done; \
else \
for i in mmseqs foldseek; do \
for j in sse2 sse41 avx2; do \
if [ -e "${i}-linux-${j}.tar.gz" ]; then \
cat ${i}-linux-${j}.tar.gz | tar -xzvf- ${i}/bin/${i}; \
mv ${i}/bin/${i} binaries/${i}_${j}; \
mv -f -- ${i}/bin/${i} binaries/${i}_${j}; \
fi; \
done; \
done; \
Expand Down

0 comments on commit 6d7d515

Please sign in to comment.