Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FROM ubuntu:20.04
- ENV DEBIAN_FRONTEND=noninteractive
- # Install dependencies
- RUN apt-get update && apt-get install -y --no-install-recommends \
- build-essential \
- gcc-8 g++-8 \
- ca-certificates \
- curl \
- ffmpeg \
- git \
- wget \
- unzip \
- nodejs \
- npm \
- python3-dev \
- python3-opencv \
- python3-pip \
- libopencv-core-dev \
- libopencv-highgui-dev \
- libopencv-imgproc-dev \
- libopencv-video-dev \
- libopencv-calib3d-dev \
- libopencv-features2d-dev \
- software-properties-common && \
- add-apt-repository -y ppa:deadsnakes/ppa && \
- apt-get update && apt-get install -y python3.10 python3.10-dev python3.10-distutils && \
- apt-get install -y openjdk-8-jdk && \
- apt-get install -y mesa-common-dev libegl1-mesa-dev libgles2-mesa-dev && \
- apt-get install -y mesa-utils && \
- apt-get clean && \
- rm -rf /var/lib/apt/lists/*
- # Update alternatives to use Python 3.10
- RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1
- RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1
- # Install pip for Python 3.10
- RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10
- RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 100 --slave /usr/bin/g++ g++ /usr/bin/g++-8
- RUN pip3 install --upgrade setuptools
- RUN pip3 install wheel
- RUN pip3 install future
- RUN pip3 install absl-py numpy opencv-contrib-python protobuf==3.20.1
- RUN pip3 install six==1.14.0
- RUN pip3 install tensorflow
- RUN pip3 install tf_slim
- RUN rm -f /usr/bin/python && ln -s /usr/bin/python3 /usr/bin/python
- WORKDIR /usr/src/app
- COPY requirements.txt .
- RUN pip install --no-cache-dir -r requirements.txt
- COPY . .
- RUN chmod +x start.sh
- ENV PYTHONBUFFERED 1
- ############ Alternative Launcher ################
- ##
- #
- #
- #CMD ["./start.sh"]
- #
- ###################################################
- ## where start.sh is
- #####################
- ## #!/bin/bash
- ##
- ## python3 urlQueueProcessor.py
- ##
- ###################################################
- CMD ["python3", "urlQueueProcessor.py"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement