Advertisement
Guest User

Untitled

a guest
Feb 15th, 2024
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.19 KB | None | 0 0
  1. FROM ubuntu:20.04
  2.  
  3. ENV DEBIAN_FRONTEND=noninteractive
  4.  
  5. # Install dependencies
  6. RUN apt-get update && apt-get install -y --no-install-recommends \
  7. build-essential \
  8. gcc-8 g++-8 \
  9. ca-certificates \
  10. curl \
  11. ffmpeg \
  12. git \
  13. wget \
  14. unzip \
  15. nodejs \
  16. npm \
  17. python3-dev \
  18. python3-opencv \
  19. python3-pip \
  20. libopencv-core-dev \
  21. libopencv-highgui-dev \
  22. libopencv-imgproc-dev \
  23. libopencv-video-dev \
  24. libopencv-calib3d-dev \
  25. libopencv-features2d-dev \
  26. software-properties-common && \
  27. add-apt-repository -y ppa:deadsnakes/ppa && \
  28. apt-get update && apt-get install -y python3.10 python3.10-dev python3.10-distutils && \
  29. apt-get install -y openjdk-8-jdk && \
  30. apt-get install -y mesa-common-dev libegl1-mesa-dev libgles2-mesa-dev && \
  31. apt-get install -y mesa-utils && \
  32. apt-get clean && \
  33. rm -rf /var/lib/apt/lists/*
  34.  
  35. # Update alternatives to use Python 3.10
  36. RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1
  37. RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1
  38.  
  39. # Install pip for Python 3.10
  40. RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10
  41.  
  42. RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 100 --slave /usr/bin/g++ g++ /usr/bin/g++-8
  43. RUN pip3 install --upgrade setuptools
  44. RUN pip3 install wheel
  45. RUN pip3 install future
  46. RUN pip3 install absl-py numpy opencv-contrib-python protobuf==3.20.1
  47. RUN pip3 install six==1.14.0
  48. RUN pip3 install tensorflow
  49. RUN pip3 install tf_slim
  50.  
  51. RUN rm -f /usr/bin/python && ln -s /usr/bin/python3 /usr/bin/python
  52.  
  53. WORKDIR /usr/src/app
  54.  
  55. COPY requirements.txt .
  56. RUN pip install --no-cache-dir -r requirements.txt
  57. COPY . .
  58. RUN chmod +x start.sh
  59. ENV PYTHONBUFFERED 1
  60.  
  61. ############ Alternative Launcher ################
  62. ##
  63. #
  64. #
  65. #CMD ["./start.sh"]
  66. #
  67. ###################################################
  68. ## where start.sh is
  69. #####################
  70. ## #!/bin/bash
  71. ##
  72. ## python3 urlQueueProcessor.py
  73. ##
  74. ###################################################
  75.  
  76. CMD ["python3", "urlQueueProcessor.py"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement