Dockerfile 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. ARG NAMESPACE=
  2. FROM debian:stable-slim as qemu-downloader
  3. ARG NAMESPACE
  4. RUN if [ X"$NAMESPACE" != X"" ]; then \
  5. apt-get update && apt-get install -y wget && rm -rf /var/lib/apt/lists/*; \
  6. fi; \
  7. if [ X"$NAMESPACE" = X"ppc64le/" ]; then \
  8. wget -nv -O /usr/bin/qemu-ppc64le-static https://github.com/multiarch/qemu-user-static/releases/download/v4.2.0-4/qemu-ppc64le-static; \
  9. chmod +x /usr/bin/qemu-ppc64le-static; \
  10. fi; \
  11. if [ X"$NAMESPACE" = X"aarch64/" ]; then \
  12. wget -nv -O /usr/bin/qemu-aarch64-static https://github.com/multiarch/qemu-user-static/releases/download/v4.2.0-4/qemu-aarch64-static; \
  13. chmod +x /usr/bin/qemu-aarch64-static; \
  14. fi; \
  15. touch /usr/bin/dummy_copy
  16. FROM ${NAMESPACE}debian:stable-slim as builder
  17. ARG NAMESPACE
  18. COPY --from=qemu-downloader /usr/bin/dummy_copy /usr/bin/qemu-ppc64le-static* /usr/bin/
  19. COPY --from=qemu-downloader /usr/bin/dummy_copy /usr/bin/qemu-aarch64-static* /usr/bin/
  20. RUN apt-get update && apt-get install -y \
  21. build-essential cmake xxd ninja-build \
  22. && rm -rf /var/lib/apt/lists/*
  23. WORKDIR /opt/hh-suite
  24. ADD . .
  25. WORKDIR /opt/hh-suite/build
  26. RUN cmake -DHAVE_SSE2=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/hh-suite ..
  27. RUN make -j $(nproc --all) install
  28. FROM ${NAMESPACE}debian:stable-slim
  29. ARG NAMESPACE
  30. MAINTAINER Milot Mirdita <[email protected]>
  31. COPY --from=qemu-downloader /usr/bin/dummy_copy /usr/bin/qemu-ppc64le-static* /usr/bin/
  32. COPY --from=qemu-downloader /usr/bin/dummy_copy /usr/bin/qemu-aarch64-static* /usr/bin/
  33. RUN apt-get update && apt-get install -y \
  34. libstdc++6 libgomp1 \
  35. && rm -rf /var/lib/apt/lists/*
  36. COPY --from=builder /usr/local/hh-suite /usr/local/hh-suite
  37. ENV HHLIB=/usr/local/hh-suite
  38. ENV PATH="/usr/local/hh-suite/bin:/usr/local/hh-suite/scripts:${PATH}"
  39. CMD ["hhblits"]