-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #311 from vcozzolino/feature-reid
ReID to Search for an Infected COVID-19 Carrier in Pandemic Scenarios
- Loading branch information
Showing
138 changed files
with
34,691 additions
and
24 deletions.
There are no files selected for viewing
6,917 changes: 6,917 additions & 0 deletions
6,917
build/crds/sedna.io_featureextractionservices.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
examples/multi-edge-inference-feature-extraction.Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
FROM python:3.8 | ||
#FROM python:3.7-slim-bullseye | ||
|
||
WORKDIR /home | ||
|
||
## Install git | ||
RUN apt update | ||
|
||
# Required by OpenCV | ||
RUN apt install libgl1-mesa-glx -y | ||
|
||
# RUN apt install -y git | ||
RUN apt install -y gfortran libopenblas-dev liblapack-dev | ||
|
||
## Install base dependencies | ||
RUN pip install torch torchvision tqdm opencv-python pillow pytorch-ignite | ||
|
||
## Add Kafka Python library | ||
RUN pip install kafka-python | ||
|
||
# ONNX | ||
RUN pip install onnx protobuf==3.16.0 | ||
|
||
## SEDNA SECTION ## | ||
|
||
COPY ./lib/requirements.txt /home | ||
RUN pip install -r /home/requirements.txt | ||
|
||
ENV PYTHONPATH "${PYTHONPATH}:/home/lib" | ||
|
||
WORKDIR /home/work | ||
COPY ./lib /home/lib | ||
|
||
# Add M3L imports | ||
COPY examples/multiedgeinference/pedestrian_tracking/feature_extraction /home/work | ||
|
||
ENV PYTHONPATH "${PYTHONPATH}:/home/work" | ||
ENV LOG_LEVEL="INFO" | ||
|
||
ENTRYPOINT ["python"] | ||
CMD ["worker.py"] |
47 changes: 47 additions & 0 deletions
47
examples/multi-edge-inference-gpu-feature-extraction.Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
FROM pytorch/pytorch:1.8.1-cuda10.2-cudnn7-devel | ||
|
||
WORKDIR /home | ||
|
||
## Install git | ||
RUN apt update -o Acquire::https::developer.download.nvidia.com::Verify-Peer=false | ||
|
||
# Required by OpenCV | ||
RUN apt install libglib2.0-0 libgl1 libglx-mesa0 libgl1-mesa-glx -y | ||
|
||
# RUN apt install -y git | ||
RUN apt install -y gfortran libopenblas-dev liblapack-dev | ||
|
||
# Update Python | ||
RUN apt install python3.8 python3.8-distutils python3-venv curl -y | ||
RUN python3.8 --version | ||
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py | ||
RUN python3.8 get-pip.py | ||
|
||
## Install base dependencies | ||
RUN python3.8 -m pip install torch torchvision tqdm opencv-python pillow pytorch-ignite --trusted-host=developer.download.nvidia.com | ||
|
||
## Add Kafka Python library | ||
RUN python3.8 -m pip install kafka-python --trusted-host=developer.download.nvidia.com | ||
|
||
# ONNX | ||
RUN pip install onnx protobuf==3.16.0 | ||
|
||
## SEDNA SECTION ## | ||
|
||
COPY ./lib/requirements.txt /home | ||
RUN python3.8 -m pip install -r /home/requirements.txt --trusted-host=developer.download.nvidia.com | ||
|
||
# This instructions should make Sedna reachable from the dertorch code part | ||
ENV PYTHONPATH "${PYTHONPATH}:/home/lib" | ||
|
||
WORKDIR /home/work | ||
COPY ./lib /home/lib | ||
|
||
# Add M3L imports | ||
COPY examples/multiedgeinference/pedestrian_tracking/feature_extraction /home/work | ||
|
||
ENV PYTHONPATH "${PYTHONPATH}:/home/work" | ||
ENV LOG_LEVEL="INFO" | ||
|
||
ENTRYPOINT ["python3.8"] | ||
CMD ["worker.py"] |
106 changes: 106 additions & 0 deletions
106
examples/multi-edge-inference-gpu-videoanalytics.Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
FROM pytorch/pytorch:1.8.1-cuda10.2-cudnn7-devel | ||
WORKDIR /home | ||
|
||
RUN apt update -o Acquire::https::developer.download.nvidia.com::Verify-Peer=false | ||
|
||
# Required by OpenCV | ||
RUN apt install libgl1 libglx-mesa0 libgl1-mesa-glx -y | ||
RUN apt install -y gfortran libopenblas-dev liblapack-dev | ||
|
||
# Update Python | ||
RUN apt install python3.8 python3.8-distutils python3-venv curl -y | ||
RUN python3.8 --version | ||
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py | ||
RUN python3.8 get-pip.py | ||
|
||
###################################################### | ||
# Install OpenCV manually with gstreamer support # | ||
###################################################### | ||
|
||
ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/London" | ||
RUN apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev \ | ||
gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad \ | ||
gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools \ | ||
gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 \ | ||
gstreamer1.0-pulseaudio -y | ||
|
||
RUN apt install ubuntu-restricted-extras wget ca-certificates -y | ||
|
||
RUN wget -k --no-check-certificate https://github.com/opencv/opencv/archive/4.5.5.zip -O opencv.zip | ||
RUN apt install unzip cmake -y | ||
|
||
RUN wget -k --no-check-certificate https://github.com/opencv/opencv_contrib/archive/4.5.5.zip -O opencv_contrib.zip | ||
|
||
RUN unzip opencv.zip | ||
RUN unzip opencv_contrib.zip | ||
|
||
RUN ls -la | ||
RUN pwd | ||
|
||
WORKDIR opencv-4.5.5 | ||
RUN mkdir build | ||
|
||
WORKDIR build | ||
|
||
RUN cmake -D CMAKE_BUILD_TYPE=RELEASE \ | ||
-D INSTALL_PYTHON_EXAMPLES=OFF \ | ||
-D INSTALL_C_EXAMPLES=OFF \ | ||
-D PYTHON_EXECUTABLE=$(which python3) \ | ||
-D BUILD_opencv_python2=OFF \ | ||
-D OPENCV_EXTRA_MODULES_PATH=/home/opencv_contrib-4.5.5/modules \ | ||
-D WITH_CUDA=ON \ | ||
-D WITH_CUDNN=OFF\ | ||
-D OPENCV_DNN_CUDA=ON\ | ||
-D ENABLE_FAST_MATH=1\ | ||
-D CUDA_FAST_MATH=1\ | ||
-D CUDA_ARCH_BIN=6.0\ | ||
-D WITH_CUBLAS=1 \ | ||
-D CMAKE_INSTALL_PREFIX=$(python3 -c "import sys; print(sys.prefix)") \ | ||
-D PYTHON3_EXECUTABLE=$(which python3) \ | ||
-D PYTHON3_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") \ | ||
-D PYTHON3_PACKAGES_PATH=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") \ | ||
-D WITH_GSTREAMER=ON \ | ||
-D BUILD_TIFF=ON \ | ||
-D BUILD_JPEG=ON \ | ||
-D WITH_JPEG=ON \ | ||
-D BUILD_EXAMPLES=OFF .. | ||
|
||
RUN make -j6 | ||
RUN make install | ||
RUN ldconfig | ||
|
||
## Install applications dependencies | ||
RUN pip install tqdm pillow pytorch-ignite asyncio --trusted-host=developer.download.nvidia.com | ||
|
||
## Add Kafka Python library | ||
RUN pip install kafka-python --trusted-host=developer.download.nvidia.com | ||
|
||
## Add tracking dependencies | ||
RUN pip install lap scipy Cython --trusted-host=developer.download.nvidia.com | ||
RUN pip install cython_bbox --trusted-host=developer.download.nvidia.com | ||
|
||
## SEDNA SECTION ## | ||
|
||
COPY ./lib/requirements.txt /home | ||
RUN pip install -r /home/requirements.txt --trusted-host=developer.download.nvidia.com | ||
|
||
ENV PYTHONPATH "${PYTHONPATH}:/home/lib" | ||
|
||
# OpenCV | ||
RUN apt install libglib2.0-0 -y | ||
|
||
## Install S3 library | ||
RUN pip install boto3 | ||
|
||
# ONNX | ||
RUN pip install onnx protobuf==3.16.0 | ||
|
||
WORKDIR /home/work | ||
COPY ./lib /home/lib | ||
|
||
COPY examples/multiedgeinference/pedestrian_tracking/detection/ /home/work/ | ||
|
||
ENV LOG_LEVEL="INFO" | ||
|
||
ENTRYPOINT ["python"] | ||
CMD ["worker.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
FROM python:3.8 | ||
|
||
WORKDIR /home | ||
|
||
## Install git | ||
RUN apt update | ||
|
||
# Required by OpenCV | ||
RUN apt install libgl1-mesa-glx -y | ||
|
||
RUN apt install -y gfortran libopenblas-dev liblapack-dev | ||
|
||
## Install application dependencies | ||
RUN pip install torch tqdm pillow opencv-python pytorch-ignite | ||
|
||
## Add Kafka Python library | ||
RUN pip install kafka-python | ||
|
||
## Install S3 library | ||
RUN pip install boto3 | ||
|
||
## SEDNA SECTION ## | ||
COPY ./lib/requirements.txt /home | ||
RUN pip install -r /home/requirements.txt | ||
|
||
ENV PYTHONPATH "${PYTHONPATH}:/home/lib" | ||
|
||
WORKDIR /home/work | ||
COPY ./lib /home/lib | ||
|
||
COPY examples/multiedgeinference/pedestrian_tracking/reid /home/work/ | ||
|
||
ENV LOG_LEVEL="INFO" | ||
|
||
ENTRYPOINT ["python"] | ||
CMD ["worker.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
FROM python:3.8 | ||
|
||
WORKDIR /home | ||
|
||
RUN apt update | ||
|
||
# Required by OpenCV | ||
RUN apt install libgl1-mesa-glx -y | ||
RUN apt install -y gfortran libopenblas-dev liblapack-dev | ||
|
||
## Install applications dependencies | ||
RUN pip install torch torchvision tqdm pillow opencv-python pytorch-ignite asyncio | ||
|
||
## Install Kafka Python library | ||
RUN pip install kafka-python | ||
|
||
## Add tracking dependencies | ||
RUN pip install lap scipy Cython | ||
RUN pip install cython_bbox | ||
|
||
## Install S3 library | ||
RUN pip install boto3 | ||
|
||
# ONNX | ||
RUN pip install onnx protobuf==3.16.0 | ||
|
||
WORKDIR /home | ||
|
||
## SEDNA SECTION ## | ||
|
||
COPY ./lib/requirements.txt /home | ||
RUN pip install -r /home/requirements.txt | ||
|
||
ENV PYTHONPATH "${PYTHONPATH}:/home/lib" | ||
|
||
WORKDIR /home/work | ||
COPY ./lib /home/lib | ||
|
||
COPY examples/multiedgeinference/pedestrian_tracking/detection /home/work/ | ||
|
||
ENV LOG_LEVEL="DEBUG" | ||
|
||
ENTRYPOINT ["python"] | ||
CMD ["worker.py"] |
Oops, something went wrong.