Dockerfile 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. FROM ubuntu:16.04
  2. ENV GOPATH /root
  3. RUN apt-get update && \
  4. apt-get install -y --no-install-suggests --no-install-recommends software-properties-common && \
  5. add-apt-repository -y ppa:gophers/archive && \
  6. apt-get update && \
  7. apt-get install -y --no-install-suggests --no-install-recommends locales golang-1.9-go python3 python3-dev libyaml-dev libyaml-0-2 curl git && \
  8. locale-gen en_US.UTF-8 && \
  9. /usr/lib/go-*/bin/go get -v gopkg.in/src-d/hercules.v2/cmd/hercules && \
  10. cp /root/bin/hercules /usr/local/bin && \
  11. cp -r /root/src/gopkg.in/src-d/hercules.v2/*.py /root/src/gopkg.in/src-d/hercules.v2/pb /usr/local/bin && \
  12. sed -i 's/parser.add_argument("--backend",/parser.add_argument("--backend", default="Agg",/' /usr/local/bin/labours.py && \
  13. echo '#!/bin/bash\n\
  14. \n\
  15. echo\n\
  16. echo " $@"\n\
  17. echo\n\' > /browser && \
  18. chmod +x /browser && \
  19. curl https://bootstrap.pypa.io/get-pip.py | python3 && \
  20. pip3 install --no-cache-dir -r /root/src/gopkg.in/src-d/hercules.v2/requirements.txt https://github.com/mind/wheels/releases/download/tf1.3-cpu/tensorflow-1.3.0-cp35-cp35m-linux_x86_64.whl && \
  21. rm -rf /root/* && \
  22. apt-get remove -y software-properties-common golang-1.9-go python3-dev libyaml-dev curl git && \
  23. apt-get remove -y *-doc *-man && \
  24. apt-get autoremove -y && \
  25. rm -rf /var/lib/apt/lists/* && \
  26. apt-get clean
  27. EXPOSE 8000
  28. ENV BROWSER /browser
  29. ENV LC_ALL en_US.UTF-8
  30. ENV COUPLES_SERVER_TIME 7200