-
Notifications
You must be signed in to change notification settings - Fork 15
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 #74 from duggalsu/config_changes
Update configs
- Loading branch information
Showing
10 changed files
with
134 additions
and
138 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -30,7 +30,16 @@ jobs: | |
workdir: src/api/ | ||
dockerfile: Dockerfile.vid_vec_rep_resnet | ||
tags: ${{ steps.vars.outputs.sha_short }} | ||
platforms: linux/amd64,linux/arm64 | ||
platforms: linux/amd64 | ||
- uses: elgohr/Publish-Docker-Github-Action@main | ||
with: | ||
username: tattletech | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
name: tattletech/feluda-operator-vidvec | ||
workdir: src/api/ | ||
dockerfile: Dockerfile.vid_vec_rep_resnet.graviton | ||
tags: ${{ steps.vars.outputs.sha_short }} | ||
platforms: linux/arm64 | ||
|
||
# - name: deploy to cluster | ||
# uses: steebchen/[email protected] | ||
|
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
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,67 @@ | ||
FROM python:3.11-slim-bullseye 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 --no-cache-dir --upgrade pip | ||
WORKDIR /app | ||
COPY ./core/operators/vid_vec_rep_resnet_requirements.txt /app/core/operators/vid_vec_rep_resnet_requirements.txt | ||
RUN pip install --no-cache-dir --user -r /app/core/operators/vid_vec_rep_resnet_requirements.txt | ||
|
||
### AWS Graviton Optimization ### | ||
|
||
# Graviton3(E) (e.g. c7g, c7gn and Hpc7g instances) supports BF16 format for ML acceleration. This can be enabled in oneDNN by setting the below environment variable | ||
ENV DNNL_DEFAULT_FPMATH_MODE=BF16 | ||
|
||
# Enable primitive caching to avoid the redundant primitive allocation | ||
# latency overhead. Please note this caching feature increases the | ||
# memory footprint. Tune this cache capacity to a lower value to | ||
# reduce the additional memory requirement. | ||
ENV LRU_CACHE_CAPACITY=1024 | ||
|
||
# Enable Transparent huge page allocations from PyTorch C10 allocator | ||
ENV THP_MEM_ALLOC_ENABLE=1 | ||
|
||
# Make sure the openmp threads are distributed across all the processes for multi process applications to avoid over subscription for the vcpus. For example if there is a single application process, then num_processes should be set to '1' so that all the vcpus are assigned to it with one-to-one mapping to omp threads | ||
# RUN num_vcpus=8 | ||
# RUN num_processes=1 | ||
# RUN temp = $((1 > ($num_vcpus/$num_processes) ? 1 : ($num_vcpus/$num_processes))) | ||
ENV OMP_NUM_THREADS=1 | ||
ENV OMP_PROC_BIND=false | ||
ENV OMP_PLACES=cores | ||
### | ||
|
||
COPY ./core/operators/vid_vec_rep_resnet.py /app/core/operators/vid_vec_rep_resnet.py | ||
|
||
COPY ./core/operators/sample_data/sample-cat-video.mp4 /app/core/operators/sample_data/sample-cat-video.mp4 | ||
COPY ./core/operators/test_vid_vec_rep_resnet.py /app/core/operators/test_vid_vec_rep_resnet.py | ||
|
||
COPY ./video_vec_operator_cprofile.py /app/video_vec_operator_cprofile.py | ||
COPY ./video_vec_operator_cprofile.sh /app/video_vec_operator_cprofile.sh | ||
RUN chmod +x video_vec_operator_cprofile.sh | ||
|
||
COPY ./video_vec_operator_time.py /app/video_vec_operator_time.py | ||
COPY ./video_vec_operator_time.sh /app/video_vec_operator_time.sh | ||
RUN chmod +x video_vec_operator_time.sh | ||
|
||
COPY ./video_vec_operator_profile.py /app/video_vec_operator_profile.py | ||
COPY ./video_vec_operator_profile_memray.sh /app/video_vec_operator_profile_memray.sh | ||
COPY ./video_vec_operator_profile_pyinstrument.sh /app/video_vec_operator_profile_pyinstrument.sh | ||
RUN chmod +x video_vec_operator_profile_memray.sh | ||
RUN chmod +x video_vec_operator_profile_pyinstrument.sh | ||
|
||
COPY ./video_vec_operator_multicore.py /app/video_vec_operator_multicore.py | ||
COPY ./video_vec_operator_multicore.sh /app/video_vec_operator_multicore.sh | ||
RUN chmod +x video_vec_operator_multicore.sh | ||
|
||
COPY ./benchmark.sh /app/benchmark.sh | ||
RUN chmod +x benchmark.sh | ||
|
||
CMD tail -f /dev/null |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
flask==2.3.2 | ||
flask_cors==3.0.9 | ||
google-cloud==0.34.0 | ||
google-cloud-vision==3.5.0 | ||
Pillow==10.2.0 | ||
elasticsearch==8.11.1 | ||
wget==3.2 | ||
pika==1.3.2 | ||
python-dotenv==1.0.0 | ||
boto3==1.34.34 | ||
click==8.1.7 | ||
pytest==7.4.4 | ||
PyYAML==6.0.1 | ||
dacite==1.8.1 | ||
memray==1.11.0 # dev | ||
pyinstrument==4.6.2 | ||
numpy==1.26.3 | ||
numpy==1.26.3 | ||
requests==2.31.0 |
Oops, something went wrong.