Advertisement
TDamiao

DockerFile Com Node Python e OPencv

Aug 18th, 2018
413
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.01 KB | None | 0 0
  1. # Pull base image.
  2. FROM library/ubuntu
  3.  
  4. MAINTAINER Ivan Seidel <ivanseidel@gmail.com>
  5.  
  6. RUN apt-get update
  7.  
  8. #
  9. # Python
  10. #
  11. RUN apt-get install -y python python-dev python-pip python-virtualenv
  12.  
  13. #
  14. # Node.js and NPM
  15. #
  16. RUN apt-get install -y nodejs nodejs-legacy npm git --no-install-recommends
  17. RUN ln -s /dev/null /dev/raw1394
  18.  
  19. #
  20. # Install OpenCV
  21. #
  22. RUN apt-get install -y python-opencv --no-install-recommends
  23.  
  24. #
  25. # Install dependencies required by node-canvas
  26. #
  27. RUN apt-get install -y libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++
  28.  
  29. #
  30. # Clear cache
  31. #
  32. RUN apt-get autoclean && apt-get clean
  33. RUN rm -rf /var/lib/apt/lists/*
  34.  
  35. #
  36. # Note: ln -s /dev/null /dev/raw1394 is to prevent error on python's
  37. #       cv2 during import: "libdc1394 error: Failed to initialize libdc1394"
  38. #       So, if you want to run another command, just update your CMD to start
  39. #       with this script, followed by whatever you want. (Not cute, but works)
  40. #
  41. CMD sh -c 'ln -s /dev/null /dev/raw1394'; npm start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement