From 85a7e6d35f817d94aa7cc4c3866e65d155cc9eb9 Mon Sep 17 00:00:00 2001 From: Aurora <5505558+duggalsu@users.noreply.github.com> Date: Tue, 6 Feb 2024 18:55:43 +0530 Subject: [PATCH 1/3] Create and optimize Dockerfiles - Optimized feluda core Dockerfile - Added image_vec_rep_resnet operator Dockerfile - Added vid_vec_rep_resnet operator Dockerfile - Updated boto3 to fix dependency incompatibility - Fixed deprecation warning for resnet18 - Updated image_vec_rep_resnet requirements.in - Recreated image_vec_rep_resnet requirements.txt - Updated nltk version in text_vec_rep_paraphrase_lxml for compatibility - Recreated text_vec_rep_paraphrase_lxml requirements.txt - Removed unused packages for video operator - Fixed os as global import in video operator - Removed ffmpeg dependency in video operator and feluda core - Recreated video operator requirements.txt - Removed unused packages from feluda core - Recreated feluda core requirements.txt --- src/api/Dockerfile | 8 +- src/api/Dockerfile.image_vec_rep_resnet | 17 +++ src/api/Dockerfile.vid_vec_rep_resnet | 17 +++ .../detect_text_in_image_requirements.in | 2 +- .../detect_text_in_image_requirements.txt | 4 +- .../core/operators/image_vec_rep_resnet.py | 2 +- .../image_vec_rep_resnet_requirements.in | 7 +- .../image_vec_rep_resnet_requirements.txt | 60 ++++++---- ...xt_vec_rep_paraphrase_lxml_requirements.in | 2 +- ...t_vec_rep_paraphrase_lxml_requirements.txt | 2 +- src/api/core/operators/vid_vec_rep_resnet.py | 6 +- .../vid_vec_rep_resnet_requirements.in | 1 - .../vid_vec_rep_resnet_requirements.txt | 2 - src/api/requirements.in | 9 +- src/api/requirements.txt | 108 ++---------------- 15 files changed, 101 insertions(+), 146 deletions(-) create mode 100644 src/api/Dockerfile.image_vec_rep_resnet create mode 100644 src/api/Dockerfile.vid_vec_rep_resnet diff --git a/src/api/Dockerfile b/src/api/Dockerfile index 556c9f75..03168396 100644 --- a/src/api/Dockerfile +++ b/src/api/Dockerfile @@ -15,10 +15,10 @@ ENV PATH=/root/.local/bin:$PATH RUN pip install --upgrade pip RUN pip install pip-tools RUN apt-get update && apt-get -y upgrade && apt-get install -y vim curl -RUN apt-get install -y ffmpeg -RUN apt-get update && \ - apt-get -y upgrade && \ - apt-get install -y tesseract-ocr tesseract-ocr-hin +# RUN apt-get install -y ffmpeg +# RUN apt-get update && \ +# apt-get -y upgrade && \ +# apt-get install -y tesseract-ocr tesseract-ocr-hin WORKDIR /app COPY requirements.txt /app/requirements.txt RUN pip install --user -r requirements.txt diff --git a/src/api/Dockerfile.image_vec_rep_resnet b/src/api/Dockerfile.image_vec_rep_resnet new file mode 100644 index 00000000..18f4c86d --- /dev/null +++ b/src/api/Dockerfile.image_vec_rep_resnet @@ -0,0 +1,17 @@ +FROM python:3.11-slim@sha256:637774748f62b832dc11e7b286e48cd716727ed04b45a0322776c01bc526afc3 AS base +RUN apt-get update \ + && apt-get -y upgrade \ + && apt-get install -y \ + --no-install-recommends gcc build-essential \ + --no-install-recommends libgl1-mesa-glx libglib2.0-0 \ + && apt-get purge -y --auto-remove \ + gcc build-essential \ + libgl1-mesa-glx libglib2.0-0 \ + && rm -rf /var/lib/apt/lists/* +ENV PATH=/root/.local/bin:$PATH +RUN pip install --upgrade pip +WORKDIR /app +COPY ./core/operators/image_vec_rep_resnet_requirements.txt /app/requirements.txt +RUN pip install --user -r requirements.txt +COPY . /app +CMD tail -f /dev/null diff --git a/src/api/Dockerfile.vid_vec_rep_resnet b/src/api/Dockerfile.vid_vec_rep_resnet new file mode 100644 index 00000000..711adf9a --- /dev/null +++ b/src/api/Dockerfile.vid_vec_rep_resnet @@ -0,0 +1,17 @@ +FROM python:3.11-slim@sha256:637774748f62b832dc11e7b286e48cd716727ed04b45a0322776c01bc526afc3 AS base +RUN apt-get update \ + && apt-get -y upgrade \ + && apt-get install -y \ + --no-install-recommends gcc build-essential \ + --no-install-recommends libgl1-mesa-glx libglib2.0-0 \ + && apt-get purge -y --auto-remove \ + gcc build-essential \ + libgl1-mesa-glx libglib2.0-0 \ + && rm -rf /var/lib/apt/lists/* +ENV PATH=/root/.local/bin:$PATH +RUN pip install --upgrade pip +WORKDIR /app +COPY ./core/operators/vid_vec_rep_resnet_requirements.txt /app/requirements.txt +RUN pip install --user -r requirements.txt +COPY . /app +CMD tail -f /dev/null diff --git a/src/api/core/operators/detect_text_in_image_requirements.in b/src/api/core/operators/detect_text_in_image_requirements.in index adfc4cf2..27dce751 100644 --- a/src/api/core/operators/detect_text_in_image_requirements.in +++ b/src/api/core/operators/detect_text_in_image_requirements.in @@ -1,3 +1,3 @@ google-cloud==0.34.0 google-cloud-vision==3.5.0 -boto3==1.34.19 \ No newline at end of file +boto3==1.34.34 \ No newline at end of file diff --git a/src/api/core/operators/detect_text_in_image_requirements.txt b/src/api/core/operators/detect_text_in_image_requirements.txt index 61702e1c..30844ee5 100644 --- a/src/api/core/operators/detect_text_in_image_requirements.txt +++ b/src/api/core/operators/detect_text_in_image_requirements.txt @@ -4,9 +4,9 @@ # # pip-compile detect_text_in_image_requirements.in # -boto3==1.34.19 +boto3==1.34.34 # via -r detect_text_in_image_requirements.in -botocore==1.34.25 +botocore==1.34.35 # via # boto3 # s3transfer diff --git a/src/api/core/operators/image_vec_rep_resnet.py b/src/api/core/operators/image_vec_rep_resnet.py index 768d4799..3e2a6a79 100644 --- a/src/api/core/operators/image_vec_rep_resnet.py +++ b/src/api/core/operators/image_vec_rep_resnet.py @@ -13,7 +13,7 @@ class ResNet18: def __init__(self): print("Initializing ResNet") - self.model = models.resnet18(pretrained=True) + self.model = models.resnet18(weights=models.ResNet18_Weights.DEFAULT) self.feature_layer = self.model._modules.get("avgpool") self.model.eval() diff --git a/src/api/core/operators/image_vec_rep_resnet_requirements.in b/src/api/core/operators/image_vec_rep_resnet_requirements.in index da340a7f..0b618647 100644 --- a/src/api/core/operators/image_vec_rep_resnet_requirements.in +++ b/src/api/core/operators/image_vec_rep_resnet_requirements.in @@ -1,3 +1,4 @@ -pytest==7.4.4 -nltk==3.8.1 -textblob==0.17.1 \ No newline at end of file +torch==2.1.2+cpu +torchvision==0.16.2+cpu +numpy==1.26.3 +Pillow==10.2.0 # dev \ No newline at end of file diff --git a/src/api/core/operators/image_vec_rep_resnet_requirements.txt b/src/api/core/operators/image_vec_rep_resnet_requirements.txt index e39d0374..0fb225c9 100644 --- a/src/api/core/operators/image_vec_rep_resnet_requirements.txt +++ b/src/api/core/operators/image_vec_rep_resnet_requirements.txt @@ -2,27 +2,47 @@ # This file is autogenerated by pip-compile with Python 3.11 # by the following command: # -# pip-compile image_vec_rep_resnet_requirements.in +# pip-compile --find-links=https://download.pytorch.org/whl/torch_stable.html image_vec_rep_resnet_requirements.in # -click==8.1.7 - # via nltk -iniconfig==2.0.0 - # via pytest -joblib==1.3.2 - # via nltk -nltk==3.8.1 +--find-links https://download.pytorch.org/whl/torch_stable.html + +certifi==2024.2.2 + # via requests +charset-normalizer==3.3.2 + # via requests +filelock==3.13.1 + # via torch +fsspec==2024.2.0 + # via torch +idna==3.6 + # via requests +jinja2==3.1.3 + # via torch +markupsafe==2.1.5 + # via jinja2 +mpmath==1.3.0 + # via sympy +networkx==3.2.1 + # via torch +numpy==1.26.3 # via # -r image_vec_rep_resnet_requirements.in - # textblob -packaging==23.2 - # via pytest -pluggy==1.3.0 - # via pytest -pytest==7.4.4 - # via -r image_vec_rep_resnet_requirements.in -regex==2023.12.25 - # via nltk -textblob==0.17.1 + # torchvision +pillow==10.2.0 + # via + # -r image_vec_rep_resnet_requirements.in + # torchvision +requests==2.31.0 + # via torchvision +sympy==1.12 + # via torch +torch==2.1.2+cpu + # via + # -r image_vec_rep_resnet_requirements.in + # torchvision +torchvision==0.16.2+cpu # via -r image_vec_rep_resnet_requirements.in -tqdm==4.66.1 - # via nltk +typing-extensions==4.9.0 + # via torch +urllib3==2.2.0 + # via requests diff --git a/src/api/core/operators/text_vec_rep_paraphrase_lxml_requirements.in b/src/api/core/operators/text_vec_rep_paraphrase_lxml_requirements.in index ffcfa42a..d0122d2a 100644 --- a/src/api/core/operators/text_vec_rep_paraphrase_lxml_requirements.in +++ b/src/api/core/operators/text_vec_rep_paraphrase_lxml_requirements.in @@ -1,5 +1,5 @@ numpy==1.26.3 -nltk==3.6.6 +nltk==3.8.1 scikit-learn==1.3.2 scipy==1.11.4 sentence-transformers==2.2.2 diff --git a/src/api/core/operators/text_vec_rep_paraphrase_lxml_requirements.txt b/src/api/core/operators/text_vec_rep_paraphrase_lxml_requirements.txt index 0e9bcb49..8148fdbc 100644 --- a/src/api/core/operators/text_vec_rep_paraphrase_lxml_requirements.txt +++ b/src/api/core/operators/text_vec_rep_paraphrase_lxml_requirements.txt @@ -40,7 +40,7 @@ mpmath==1.3.0 # via sympy networkx==3.2.1 # via torch -nltk==3.6.6 +nltk==3.8.1 # via # -r text_vec_rep_paraphrase_lxml_requirements.in # sentence-transformers diff --git a/src/api/core/operators/vid_vec_rep_resnet.py b/src/api/core/operators/vid_vec_rep_resnet.py index 6f610345..ccb0af06 100644 --- a/src/api/core/operators/vid_vec_rep_resnet.py +++ b/src/api/core/operators/vid_vec_rep_resnet.py @@ -3,7 +3,7 @@ def initialize(param): print("Installing packages for vid_vec_rep_resnet") - global TextBlob, os, np, cv2, qr, torch, data, models, transforms, Image, wget #, FFmpeg + global os, np, cv2, qr, torch, data, models, transforms, Image #, wget #, FFmpeg global imagenet_transform, ImageListDataset, VideoAnalyzer, gendata #, compress_video import os @@ -16,7 +16,7 @@ def initialize(param): import torchvision.transforms as transforms from PIL import Image # from ffmpy import FFmpeg - import wget + # import wget imagenet_transform = transforms.Compose( [ @@ -88,7 +88,7 @@ def __init__(self, video, sampling_rate=10, n_keyframes=5): self.n_samples = self.n_frames / sampling_rate self.n_keyframes = n_keyframes # print("init model") - self.model = models.resnet18(pretrained=True) + self.model = models.resnet18(weights=models.ResNet18_Weights.DEFAULT) # print(type(self.model)) # list of individual PIL Images self.frame_images = [] diff --git a/src/api/core/operators/vid_vec_rep_resnet_requirements.in b/src/api/core/operators/vid_vec_rep_resnet_requirements.in index f125ba08..4889efac 100644 --- a/src/api/core/operators/vid_vec_rep_resnet_requirements.in +++ b/src/api/core/operators/vid_vec_rep_resnet_requirements.in @@ -1,7 +1,6 @@ torch==2.1.2+cpu torchvision==0.16.2+cpu numpy==1.26.3 -wget==3.2 Pillow==10.2.0 scipy==1.11.4 opencv-python-headless==4.9.0.80 \ No newline at end of file diff --git a/src/api/core/operators/vid_vec_rep_resnet_requirements.txt b/src/api/core/operators/vid_vec_rep_resnet_requirements.txt index 0ed3fc57..c602b9ab 100644 --- a/src/api/core/operators/vid_vec_rep_resnet_requirements.txt +++ b/src/api/core/operators/vid_vec_rep_resnet_requirements.txt @@ -52,5 +52,3 @@ typing-extensions==4.9.0 # via torch urllib3==2.0.7 # via requests -wget==3.2 - # via -r vid_vec_rep_resnet_requirements.in diff --git a/src/api/requirements.in b/src/api/requirements.in index 3d11be93..0b21c005 100644 --- a/src/api/requirements.in +++ b/src/api/requirements.in @@ -2,22 +2,15 @@ flask==2.3.2 flask_cors==3.0.9 google-cloud==0.34.0 google-cloud-vision==3.5.0 -scikit-image==0.22.0 -tqdm==4.66.1 torch==2.1.2+cpu torchvision==0.16.2+cpu -textblob==0.17.1 Pillow==10.2.0 -opencv-python-headless==4.9.0.80 elasticsearch==8.11.1 wget==3.2 pika==1.3.2 -ffmpy==0.3.1 -sentence-transformers==2.2.2 python-dotenv==1.0.0 -boto3==1.34.19 +boto3==1.34.34 click==8.1.7 -typing-extensions==4.9.0 pytest==7.4.4 PyYAML==6.0.1 dacite==1.8.1 diff --git a/src/api/requirements.txt b/src/api/requirements.txt index 08dace8d..90c03c9c 100644 --- a/src/api/requirements.txt +++ b/src/api/requirements.txt @@ -8,9 +8,9 @@ blinker==1.7.0 # via flask -boto3==1.34.19 +boto3==1.34.34 # via -r requirements.in -botocore==1.34.19 +botocore==1.34.35 # via # boto3 # s3transfer @@ -26,20 +26,14 @@ click==8.1.7 # via # -r requirements.in # flask - # nltk dacite==1.8.1 # via -r requirements.in elastic-transport==8.11.0 # via elasticsearch elasticsearch==8.11.1 # via -r requirements.in -ffmpy==0.3.1 - # via -r requirements.in filelock==3.13.1 - # via - # huggingface-hub - # torch - # transformers + # via torch flask==2.3.2 # via # -r requirements.in @@ -47,9 +41,7 @@ flask==2.3.2 flask-cors==3.0.9 # via -r requirements.in fsspec==2023.12.2 - # via - # huggingface-hub - # torch + # via torch google-api-core[grpc]==1.34.0 # via # google-api-core @@ -70,15 +62,8 @@ grpcio==1.60.0 # grpcio-status grpcio-status==1.36.1 # via google-api-core -huggingface-hub==0.20.2 - # via - # sentence-transformers - # tokenizers - # transformers idna==3.6 # via requests -imageio==2.33.1 - # via scikit-image iniconfig==2.0.0 # via pytest itsdangerous==2.1.2 @@ -92,12 +77,6 @@ jmespath==0.10.0 # via # boto3 # botocore -joblib==1.3.2 - # via - # nltk - # scikit-learn -lazy-loader==0.3 - # via scikit-image linkify-it-py==2.0.3 # via markdown-it-py markdown-it-py[linkify,plugins]==3.0.0 @@ -118,39 +97,16 @@ memray==1.11.0 mpmath==1.3.0 # via sympy networkx==3.2.1 - # via - # scikit-image - # torch -nltk==3.8.1 - # via - # sentence-transformers - # textblob + # via torch numpy==1.26.3 - # via - # imageio - # opencv-python-headless - # scikit-image - # scikit-learn - # scipy - # sentence-transformers - # tifffile - # torchvision - # transformers -opencv-python-headless==4.9.0.80 - # via -r requirements.in + # via torchvision packaging==23.2 - # via - # huggingface-hub - # pytest - # scikit-image - # transformers + # via pytest pika==1.3.2 # via -r requirements.in pillow==10.2.0 # via # -r requirements.in - # imageio - # scikit-image # torchvision pluggy==1.3.0 # via pytest @@ -180,20 +136,11 @@ python-dateutil==2.8.1 python-dotenv==1.0.0 # via -r requirements.in pyyaml==6.0.1 - # via - # -r requirements.in - # huggingface-hub - # transformers -regex==2023.12.25 - # via - # nltk - # transformers + # via -r requirements.in requests==2.31.0 # via # google-api-core - # huggingface-hub # torchvision - # transformers rich==13.7.0 # via # memray @@ -202,21 +149,6 @@ rsa==4.7.2 # via google-auth s3transfer==0.10.0 # via boto3 -safetensors==0.4.1 - # via transformers -scikit-image==0.22.0 - # via -r requirements.in -scikit-learn==1.1.3 - # via sentence-transformers -scipy==1.11.4 - # via - # scikit-image - # scikit-learn - # sentence-transformers -sentence-transformers==2.2.2 - # via -r requirements.in -sentencepiece==0.1.99 - # via sentence-transformers six==1.15.0 # via # flask-cors @@ -224,38 +156,16 @@ six==1.15.0 # python-dateutil sympy==1.12 # via torch -textblob==0.17.1 - # via -r requirements.in textual==0.48.2 # via memray -threadpoolctl==2.1.0 - # via scikit-learn -tifffile==2023.12.9 - # via scikit-image -tokenizers==0.15.0 - # via transformers torch==2.1.2+cpu # via # -r requirements.in - # sentence-transformers # torchvision torchvision==0.16.2+cpu - # via - # -r requirements.in - # sentence-transformers -tqdm==4.66.1 - # via - # -r requirements.in - # huggingface-hub - # nltk - # sentence-transformers - # transformers -transformers==4.36.0 - # via sentence-transformers + # via -r requirements.in typing-extensions==4.9.0 # via - # -r requirements.in - # huggingface-hub # textual # torch uc-micro-py==1.0.2 From 7b0cf99454ba598f9fc33f625df2d89d0671e4dc Mon Sep 17 00:00:00 2001 From: Aurora <5505558+duggalsu@users.noreply.github.com> Date: Wed, 7 Feb 2024 13:15:47 +0530 Subject: [PATCH 2/3] - Updated readme - Added --no-cache-dir for pip install in dockerfiles - Removed vim curl single install command from core dockerfile - Removed torch, torchvision as core feluda dependency - Added numpy as core feluda dependency - Recreated core requirements.txt - Modified test urls --- README.md | 9 ++++++ src/api/Dockerfile | 9 +++--- src/api/Dockerfile.image_vec_rep_resnet | 4 +-- src/api/Dockerfile.vid_vec_rep_resnet | 4 +-- src/api/requirements.in | 3 +- src/api/requirements.txt | 35 ++++------------------- src/api/tests/test_index_api_as_client.py | 4 +-- 7 files changed, 25 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index 2a4c70a1..39ad9d59 100644 --- a/README.md +++ b/README.md @@ -69,8 +69,17 @@ Please create a new Discussion [here](https://github.com/tattle-made/tattle-api/ $ cd src/api/core/operators/ $ pip install -r image_vec_rep_resnet_requirements.txt $ pip install -r vid_vec_rep_resnet_requirements.txt + +..# Create the docker containers + $ cd src/api/ + $ docker build -t image-operator -f Dockerfile.image_vec_rep_resnet . + $ docker build -t video-operator -f Dockerfile.vid_vec_rep_resnet . +..# Run the docker image + docker run image-operator + docker run video-operator ``` + 6. Then, in a new terminal, start the server with: ``` diff --git a/src/api/Dockerfile b/src/api/Dockerfile index 03168396..aa16f122 100644 --- a/src/api/Dockerfile +++ b/src/api/Dockerfile @@ -12,16 +12,15 @@ RUN apt-get update \ libgl1-mesa-glx libglib2.0-0 \ && rm -rf /var/lib/apt/lists/* ENV PATH=/root/.local/bin:$PATH -RUN pip install --upgrade pip -RUN pip install pip-tools -RUN apt-get update && apt-get -y upgrade && apt-get install -y vim curl +RUN pip install --no-cache-dir --upgrade pip +# RUN apt-get update && apt-get -y upgrade && apt-get install -y vim curl # RUN apt-get install -y ffmpeg # RUN apt-get update && \ # apt-get -y upgrade && \ # apt-get install -y tesseract-ocr tesseract-ocr-hin WORKDIR /app COPY requirements.txt /app/requirements.txt -RUN pip install --user -r requirements.txt +RUN pip install --no-cache-dir --user -r requirements.txt COPY . /app EXPOSE 7000 @@ -35,7 +34,7 @@ EXPOSE 7000 #### DEBUG IMAGE #### FROM base AS debug RUN apt-get update && apt-get install -y vim zsh jq -RUN pip install debugpy nose2 +RUN pip install --no-cache-dir debugpy nose2 RUN export FLASK_DEBUG=1 CMD python -m debugpy --listen 0.0.0.0:5678 --wait-for-client -m flask run -h 0.0.0.0 -p 5000 diff --git a/src/api/Dockerfile.image_vec_rep_resnet b/src/api/Dockerfile.image_vec_rep_resnet index 18f4c86d..eae6890c 100644 --- a/src/api/Dockerfile.image_vec_rep_resnet +++ b/src/api/Dockerfile.image_vec_rep_resnet @@ -9,9 +9,9 @@ RUN apt-get update \ libgl1-mesa-glx libglib2.0-0 \ && rm -rf /var/lib/apt/lists/* ENV PATH=/root/.local/bin:$PATH -RUN pip install --upgrade pip +RUN pip install --no-cache-dir --upgrade pip WORKDIR /app COPY ./core/operators/image_vec_rep_resnet_requirements.txt /app/requirements.txt -RUN pip install --user -r requirements.txt +RUN pip install --no-cache-dir --user -r requirements.txt COPY . /app CMD tail -f /dev/null diff --git a/src/api/Dockerfile.vid_vec_rep_resnet b/src/api/Dockerfile.vid_vec_rep_resnet index 711adf9a..87beac3c 100644 --- a/src/api/Dockerfile.vid_vec_rep_resnet +++ b/src/api/Dockerfile.vid_vec_rep_resnet @@ -9,9 +9,9 @@ RUN apt-get update \ libgl1-mesa-glx libglib2.0-0 \ && rm -rf /var/lib/apt/lists/* ENV PATH=/root/.local/bin:$PATH -RUN pip install --upgrade pip +RUN pip install --no-cache-dir --upgrade pip WORKDIR /app COPY ./core/operators/vid_vec_rep_resnet_requirements.txt /app/requirements.txt -RUN pip install --user -r requirements.txt +RUN pip install --no-cache-dir --user -r requirements.txt COPY . /app CMD tail -f /dev/null diff --git a/src/api/requirements.in b/src/api/requirements.in index 0b21c005..4fec7940 100644 --- a/src/api/requirements.in +++ b/src/api/requirements.in @@ -2,8 +2,6 @@ flask==2.3.2 flask_cors==3.0.9 google-cloud==0.34.0 google-cloud-vision==3.5.0 -torch==2.1.2+cpu -torchvision==0.16.2+cpu Pillow==10.2.0 elasticsearch==8.11.1 wget==3.2 @@ -16,3 +14,4 @@ PyYAML==6.0.1 dacite==1.8.1 memray==1.11.0 # dev pyinstrument==4.6.2 +numpy==1.26.3 \ No newline at end of file diff --git a/src/api/requirements.txt b/src/api/requirements.txt index 90c03c9c..fda92db9 100644 --- a/src/api/requirements.txt +++ b/src/api/requirements.txt @@ -2,10 +2,8 @@ # This file is autogenerated by pip-compile with Python 3.11 # by the following command: # -# pip-compile --find-links=https://download.pytorch.org/whl/torch_stable.html requirements.in +# pip-compile requirements.in # ---find-links https://download.pytorch.org/whl/torch_stable.html - blinker==1.7.0 # via flask boto3==1.34.34 @@ -32,16 +30,12 @@ elastic-transport==8.11.0 # via elasticsearch elasticsearch==8.11.1 # via -r requirements.in -filelock==3.13.1 - # via torch flask==2.3.2 # via # -r requirements.in # flask-cors flask-cors==3.0.9 # via -r requirements.in -fsspec==2023.12.2 - # via torch google-api-core[grpc]==1.34.0 # via # google-api-core @@ -72,7 +66,6 @@ jinja2==3.1.3 # via # flask # memray - # torch jmespath==0.10.0 # via # boto3 @@ -94,20 +87,14 @@ mdurl==0.1.2 # via markdown-it-py memray==1.11.0 # via -r requirements.in -mpmath==1.3.0 - # via sympy -networkx==3.2.1 - # via torch numpy==1.26.3 - # via torchvision + # via -r requirements.in packaging==23.2 # via pytest pika==1.3.2 # via -r requirements.in pillow==10.2.0 - # via - # -r requirements.in - # torchvision + # via -r requirements.in pluggy==1.3.0 # via pytest proto-plus==1.23.0 @@ -138,9 +125,7 @@ python-dotenv==1.0.0 pyyaml==6.0.1 # via -r requirements.in requests==2.31.0 - # via - # google-api-core - # torchvision + # via google-api-core rich==13.7.0 # via # memray @@ -154,20 +139,10 @@ six==1.15.0 # flask-cors # google-auth # python-dateutil -sympy==1.12 - # via torch textual==0.48.2 # via memray -torch==2.1.2+cpu - # via - # -r requirements.in - # torchvision -torchvision==0.16.2+cpu - # via -r requirements.in typing-extensions==4.9.0 - # via - # textual - # torch + # via textual uc-micro-py==1.0.2 # via linkify-it-py urllib3==2.0.7 diff --git a/src/api/tests/test_index_api_as_client.py b/src/api/tests/test_index_api_as_client.py index ac08b694..827cf1f4 100644 --- a/src/api/tests/test_index_api_as_client.py +++ b/src/api/tests/test_index_api_as_client.py @@ -43,7 +43,7 @@ def testIndexImage(self): "post": { "id": "1234", "media_type": "image", - "media_url": "https://fs.tattle.co.in/service/kosh/file/c8709f21-bd7d-4e22-af14-50ad8a429f84", + "media_url": "https://raw.githubusercontent.com/tattle-made/feluda/master/src/api/core/operators/sample_data/people.jpg", "datasource_id": "asdfasdf-asdfasdf-asdf", "client_id": "123-12312", }, @@ -69,7 +69,7 @@ def testIndexVideo(self): "post": { "id": "1234", "media_type": "video", - "media_url": "https://fs.tattle.co.in/service/kosh/file/07ba4a2f-c0a2-44ba-96d8-7b4cc94c8ee7", + "media_url": "https://github.com/tattle-made/feluda/raw/master/src/api/core/operators/sample_data/sample-cat-video.mp4", "datasource_id": "asdfasdf-asdfasdf-asdf", "client_id": "123-12312", }, From 267d13ebb2ce1cb3a7774523c424f1fa955f8783 Mon Sep 17 00:00:00 2001 From: Aurora <5505558+duggalsu@users.noreply.github.com> Date: Wed, 7 Feb 2024 13:24:56 +0530 Subject: [PATCH 3/3] - fixed typo in readme --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 39ad9d59..6f4e80fb 100644 --- a/README.md +++ b/README.md @@ -69,14 +69,14 @@ Please create a new Discussion [here](https://github.com/tattle-made/tattle-api/ $ cd src/api/core/operators/ $ pip install -r image_vec_rep_resnet_requirements.txt $ pip install -r vid_vec_rep_resnet_requirements.txt - -..# Create the docker containers +.. +# Create the docker containers $ cd src/api/ $ docker build -t image-operator -f Dockerfile.image_vec_rep_resnet . $ docker build -t video-operator -f Dockerfile.vid_vec_rep_resnet . -..# Run the docker image - docker run image-operator - docker run video-operator +# Run the docker image + $ docker run image-operator + $ docker run video-operator ```