Skip to content

Commit

Permalink
Added all files for the compression benchmark. Tested locally with do…
Browse files Browse the repository at this point in the history
…cker-compose.

Signed-off-by: L Lakshmanan <[email protected]@research.iiit.ac.in>
  • Loading branch information
Lakshman authored and Lakshman committed Jul 16, 2024
1 parent 42f3046 commit 63987ed
Show file tree
Hide file tree
Showing 7 changed files with 2,628 additions and 0 deletions.
42 changes: 42 additions & 0 deletions benchmarks/compression/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# MIT License

# Copyright (c) 2024 EASE lab

# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:

# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.

# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

ROOT = ../../
FUNCTIONS = compression-python
ALL_IMAGES = $(FUNCTIONS)

all-image: $(ALL_IMAGES)

compression-python: docker/Dockerfile python/server.py python/requirements.txt files/metamorphosis.txt
DOCKER_BUILDKIT=1 docker build \
--tag vhiveease/compression-python:latest \
--target compressionPython \
-f docker/Dockerfile \
$(ROOT) --load

## Push images
push:
docker push docker.io/vhiveease/compression-python:latest

## Pull images from docker hub
pull:
docker pull docker.io/vhiveease/compression-python:latest
42 changes: 42 additions & 0 deletions benchmarks/compression/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# MIT License

# Copyright (c) 2024 EASE lab

# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:

# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.

# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

#---------- PYTHON -----------#
# First stage (Builder):
# Install gRPC and all other dependencies
FROM vhiveease/python-slim:latest as compressionPythonBuilder
WORKDIR /py
COPY ./benchmarks/compression/python/requirements.txt ./requirements.txt
RUN pip3 install --user -r requirements.txt
COPY ./utils/tracing/python/tracing.py ./
COPY ./benchmarks/compression/files/metamorphosis.txt ./
COPY ./benchmarks/compression/python/server.py ./
ADD https://raw.githubusercontent.com/vhive-serverless/vSwarm-proto/adding-functions/proto/compression/compression_pb2_grpc.py ./
ADD https://raw.githubusercontent.com/vhive-serverless/vSwarm-proto/adding-functions/proto/compression/compression_pb2.py ./proto/compression/

# Second stage (Runner):
FROM vhiveease/python-slim:latest as compressionPython
COPY --from=compressionPythonBuilder /root/.local /root/.local
COPY --from=compressionPythonBuilder /py /app
WORKDIR /app
# ENV PATH=/root/.local/bin:$PATH
ENTRYPOINT [ "python3", "/app/server.py" ]
Loading

0 comments on commit 63987ed

Please sign in to comment.