Dockerfile.user 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. FROM tensorflow/tensorflow:latest-gpu
  2. MAINTAINER ahkui <ahkui@outlook.com>
  3. RUN apt-get update && apt-get install -y --no-install-recommends \
  4. python \
  5. python-dev \
  6. && \
  7. apt-get autoremove -y && \
  8. apt-get autoclean && \
  9. apt-get clean && \
  10. rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
  11. RUN apt-get update && apt-get install -y --no-install-recommends \
  12. wget \
  13. git \
  14. && \
  15. apt-get autoremove -y && \
  16. apt-get autoclean && \
  17. apt-get clean && \
  18. rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
  19. RUN curl -O https://bootstrap.pypa.io/get-pip.py && \
  20. python3 get-pip.py && \
  21. rm get-pip.py
  22. RUN python3 -m pip --quiet --no-cache-dir install \
  23. Pillow \
  24. h5py \
  25. ipykernel \
  26. jupyter \
  27. notebook \
  28. jupyterhub \
  29. matplotlib \
  30. numpy \
  31. pandas \
  32. scipy \
  33. sklearn \
  34. Flask \
  35. gunicorn \
  36. pymongo \
  37. redis \
  38. requests \
  39. ipyparallel \
  40. bs4 \
  41. && \
  42. python3 -m ipykernel.kernelspec
  43. RUN pip --no-cache-dir install \
  44. https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.8.0-cp35-cp35m-linux_x86_64.whl
  45. RUN ln -s -f /usr/bin/python3 /usr/bin/python
  46. COPY start.sh /usr/local/bin/
  47. COPY start-notebook.sh /usr/local/bin/
  48. COPY start-singleuser.sh /usr/local/bin/
  49. RUN chmod +x /usr/local/bin/start.sh
  50. RUN chmod +x /usr/local/bin/start-notebook.sh
  51. RUN chmod +x /usr/local/bin/start-singleuser.sh
  52. RUN wget --quiet https://github.com/krallin/tini/releases/download/v0.10.0/tini && \
  53. mv tini /usr/local/bin/tini && \
  54. chmod +x /usr/local/bin/tini
  55. # cleanup
  56. RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
  57. ENTRYPOINT ["tini", "--"]
  58. CMD ["start-notebook.sh"]