Skip to content

Commit

Permalink
convert remaining docker build to git action
Browse files Browse the repository at this point in the history
  • Loading branch information
jojoc4 committed Dec 27, 2022
1 parent c5d71d5 commit 188f538
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 26 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,33 @@ jobs:
push: true
tags: jojoc4/lsbs-bdd:latest
file: Benchmarks/files/bdd/Dockerfile
- name: Build and push blender
uses: docker/build-push-action@v3
with:
push: true
tags: jojoc4/lsbs-blender:latest
file: Benchmarks/files/blender/Dockerfile
- name: Build and push dl
uses: docker/build-push-action@v3
with:
push: true
tags: jojoc4/lsbs-dl:latest
file: Benchmarks/files/dl/Dockerfile
- name: Build and push fio
uses: docker/build-push-action@v3
with:
push: true
tags: jojoc4/lsbs-fio:latest
file: Benchmarks/files/fio/Dockerfile
- name: Build and push hpcc
uses: docker/build-push-action@v3
with:
push: true
tags: jojoc4/lsbs-hpcc:latest
file: Benchmarks/files/hpcc/Dockerfile
- name: Build and push rest
uses: docker/build-push-action@v3
with:
push: true
tags: jojoc4/lsbs-rest:latest
file: Benchmarks/files/rest/Dockerfile
2 changes: 1 addition & 1 deletion Benchmarks/files/blender/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM nvidia/cuda:11.3.0-devel-ubuntu20.04
RUN apt update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt install -y wget bzip2 libfreetype6 libgl1-mesa-dev libglu1-mesa libxi6 libxrender1 curl
ADD ./* /bench/
ADD ./Benchmarks/files/blender/* /bench/
RUN chmod +x /bench/run.sh
WORKDIR /bench/
RUN wget https://download.blender.org/release/BlenderBenchmark2.0/launcher/benchmark-launcher-cli-3.1.0-linux.tar.gz
Expand Down
4 changes: 2 additions & 2 deletions Benchmarks/files/dl/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM nvcr.io/nvidia/tensorflow:22.08-tf2-py3
RUN apt update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt install -y python3-pip unzip curl
ADD ./* /bench/
ADD img /bench/img
ADD ./Benchmarks/files/dl/* /bench/
ADD ./Benchmarks/files/dl/img /bench/img
RUN chmod +x /bench/run.sh
WORKDIR /bench/
RUN pip3 install -r requirements.txt
Expand Down
20 changes: 10 additions & 10 deletions Benchmarks/files/docker/run.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
#!/bin/bash
case "$BENCHMARK" in

0) docker run --rm -e CONTROLPLANEIP=$CONTROLPLANEIP -e SYSTEM=$SYSTEM -e TYPE=$TYPE registry.jojoc4.ch/tm-hpcc
docker run --rm -e CONTROLPLANEIP=$CONTROLPLANEIP -e SYSTEM=$SYSTEM -e TYPE=$TYPE registry.jojoc4.ch/tm-fio
0) docker run --rm -e CONTROLPLANEIP=$CONTROLPLANEIP -e SYSTEM=$SYSTEM -e TYPE=$TYPE jojoc4/lsbs-hpcc
docker run --rm -e CONTROLPLANEIP=$CONTROLPLANEIP -e SYSTEM=$SYSTEM -e TYPE=$TYPE jojoc4/lsbs-fio
docker run --rm -e CONTROLPLANEIP=$CONTROLPLANEIP -e SYSTEM=$SYSTEM -e TYPE=$TYPE -e SERVERNAME=$SERVERNAME jojoc4/lsbs-iperf
docker run --rm -e CONTROLPLANEIP=$CONTROLPLANEIP -e SYSTEM=$SYSTEM -e TYPE=$TYPE registry.jojoc4.ch/tm-blender
docker run --rm -e CONTROLPLANEIP=$CONTROLPLANEIP -e SYSTEM=$SYSTEM -e TYPE=$TYPE registry.jojoc4.ch/tm-dl
docker run --rm -e CONTROLPLANEIP=$CONTROLPLANEIP -e SYSTEM=$SYSTEM -e TYPE=$TYPE jojoc4/lsbs-blender
docker run --rm -e CONTROLPLANEIP=$CONTROLPLANEIP -e SYSTEM=$SYSTEM -e TYPE=$TYPE jojoc4/lsbs-dl
docker run --rm -e CONTROLPLANEIP=$CONTROLPLANEIP -e SYSTEM=$SYSTEM -e TYPE=$TYPE jojoc4/lsbs-bdd
docker run --rm -e CONTROLPLANEIP=$CONTROLPLANEIP -e SYSTEM=$SYSTEM -e TYPE=$TYPE -e SERVERNAME=$SERVERNAME -p 30500:5000 registry.jojoc4.ch/tm-rest
docker run --rm -e CONTROLPLANEIP=$CONTROLPLANEIP -e SYSTEM=$SYSTEM -e TYPE=$TYPE -e SERVERNAME=$SERVERNAME -p 30500:5000 jojoc4/lsbs-rest
;;
1) docker run --rm -e CONTROLPLANEIP=$CONTROLPLANEIP -e SYSTEM=$SYSTEM -e TYPE=$TYPE registry.jojoc4.ch/tm-hpcc ;;
2) docker run --rm -e CONTROLPLANEIP=$CONTROLPLANEIP -e SYSTEM=$SYSTEM -e TYPE=$TYPE registry.jojoc4.ch/tm-fio ;;
1) docker run --rm -e CONTROLPLANEIP=$CONTROLPLANEIP -e SYSTEM=$SYSTEM -e TYPE=$TYPE jojoc4/lsbs-hpcc ;;
2) docker run --rm -e CONTROLPLANEIP=$CONTROLPLANEIP -e SYSTEM=$SYSTEM -e TYPE=$TYPE jojoc4/lsbs-fio ;;
3) docker run --rm -e CONTROLPLANEIP=$CONTROLPLANEIP -e SYSTEM=$SYSTEM -e TYPE=$TYPE -e SERVERNAME=$SERVERNAME jojoc4/lsbs-iperf ;;
4) docker run --rm -e CONTROLPLANEIP=$CONTROLPLANEIP -e SYSTEM=$SYSTEM -e TYPE=$TYPE registry.jojoc4.ch/tm-blender ;;
4) docker run --rm -e CONTROLPLANEIP=$CONTROLPLANEIP -e SYSTEM=$SYSTEM -e TYPE=$TYPE jojoc4/lsbs-blender ;;
5) docker run --rm -e CONTROLPLANEIP=$CONTROLPLANEIP -e SYSTEM=$SYSTEM -e TYPE=$TYPE jojoc4/lsbs-bdd ;;
6) docker run --rm -e CONTROLPLANEIP=$CONTROLPLANEIP -e SYSTEM=$SYSTEM -e TYPE=$TYPE registry.jojoc4.ch/tm-dl ;;
7) docker run --rm -e CONTROLPLANEIP=$CONTROLPLANEIP -e SYSTEM=$SYSTEM -e TYPE=$TYPE -e SERVERNAME=$SERVERNAME -p 30500:5000 registry.jojoc4.ch/tm-rest ;;
6) docker run --rm -e CONTROLPLANEIP=$CONTROLPLANEIP -e SYSTEM=$SYSTEM -e TYPE=$TYPE jojoc4/lsbs-dl ;;
7) docker run --rm -e CONTROLPLANEIP=$CONTROLPLANEIP -e SYSTEM=$SYSTEM -e TYPE=$TYPE -e SERVERNAME=$SERVERNAME -p 30500:5000 jojoc4/lsbs-rest ;;

esac
docker system prune -af
2 changes: 1 addition & 1 deletion Benchmarks/files/fio/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ubuntu:20.04
RUN apt update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt install -y fio curl
ADD ./* /bench/
ADD ./Benchmarks/files/fio/* /bench/
RUN chmod +x /bench/run.sh
WORKDIR /bench/
ENTRYPOINT ./run.sh
2 changes: 1 addition & 1 deletion Benchmarks/files/hpcc/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ubuntu:20.04
RUN apt update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt install -y hpcc curl
ADD ./* /bench/
ADD ./Benchmarks/files/hpcc/* /bench/
RUN chmod +x /bench/run.sh
WORKDIR /bench/
ENV OMPI_ALLOW_RUN_AS_ROOT=1
Expand Down
20 changes: 10 additions & 10 deletions Benchmarks/files/k8s/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
case "$BENCHMARK" in

0)
k0s kubectl run hpcc --image=registry.jojoc4.ch/tm-hpcc --env="CONTROLPLANEIP=$CONTROLPLANEIP" --env="SYSTEM=$SYSTEM" --env="TYPE=$TYPE" --restart=Never --request-timeout=0
k0s kubectl run hpcc --image=jojoc4/lsbs-hpcc --env="CONTROLPLANEIP=$CONTROLPLANEIP" --env="SYSTEM=$SYSTEM" --env="TYPE=$TYPE" --restart=Never --request-timeout=0
while [[ $(k0s kubectl get pods hpcc --no-headers -o custom-columns=":status.phase") != "Succeeded" ]]; do
sleep 1
done
k0s kubectl delete pod hpcc --now

k0s kubectl run fio --image=registry.jojoc4.ch/tm-fio --env="CONTROLPLANEIP=$CONTROLPLANEIP" --env="SYSTEM=$SYSTEM" --env="TYPE=$TYPE" --restart=Never --request-timeout=0
k0s kubectl run fio --image=jojoc4/lsbs-fio --env="CONTROLPLANEIP=$CONTROLPLANEIP" --env="SYSTEM=$SYSTEM" --env="TYPE=$TYPE" --restart=Never --request-timeout=0
while [[ $(k0s kubectl get pods fio --no-headers -o custom-columns=":status.phase") != "Succeeded" ]]; do
sleep 1
done
Expand All @@ -20,13 +20,13 @@ case "$BENCHMARK" in
done
k0s kubectl delete pod iperf --now

k0s kubectl run blender --image=registry.jojoc4.ch/tm-blender --env="CONTROLPLANEIP=$CONTROLPLANEIP" --env="SYSTEM=$SYSTEM" --env="TYPE=$TYPE" --restart=Never --request-timeout=0
k0s kubectl run blender --image=jojoc4/lsbs-blender --env="CONTROLPLANEIP=$CONTROLPLANEIP" --env="SYSTEM=$SYSTEM" --env="TYPE=$TYPE" --restart=Never --request-timeout=0
while [[ $(k0s kubectl get pods blender --no-headers -o custom-columns=":status.phase") != "Succeeded" ]]; do
sleep 1
done
k0s kubectl delete pod blender --now

k0s kubectl run dl --image=registry.jojoc4.ch/tm-dl --env="CONTROLPLANEIP=$CONTROLPLANEIP" --env="SYSTEM=$SYSTEM" --env="TYPE=$TYPE" --restart=Never --request-timeout=0
k0s kubectl run dl --image=jojoc4/lsbs-dl --env="CONTROLPLANEIP=$CONTROLPLANEIP" --env="SYSTEM=$SYSTEM" --env="TYPE=$TYPE" --restart=Never --request-timeout=0
while [[ $(k0s kubectl get pods dl --no-headers -o custom-columns=":status.phase") != "Succeeded" ]]; do
sleep 1
done
Expand All @@ -38,21 +38,21 @@ case "$BENCHMARK" in
done
k0s kubectl delete pod bdd --now

k0s kubectl run rest --image=registry.jojoc4.ch/tm-rest --env="CONTROLPLANEIP=$CONTROLPLANEIP" --env="SYSTEM=$SYSTEM" --env="TYPE=$TYPE" --env="SERVERNAME=$SERVERNAME" --restart=Never --request-timeout=0 --port=5000
k0s kubectl run rest --image=jojoc4/lsbs-rest --env="CONTROLPLANEIP=$CONTROLPLANEIP" --env="SYSTEM=$SYSTEM" --env="TYPE=$TYPE" --env="SERVERNAME=$SERVERNAME" --restart=Never --request-timeout=0 --port=5000
k0s kubectl expose --type=NodePort pod rest --port 5000 --name web --overrides '{ "apiVersion": "v1","spec":{"ports": [{"port":5000,"protocol":"TCP","targetPort":5000,"nodePort":30500}]}}'
while [[ $(k0s kubectl get pods rest --no-headers -o custom-columns=":status.phase") != "Succeeded" ]]; do
sleep 1
done
k0s kubectl delete svc web
k0s kubectl delete pod rest --now
;;
1) k0s kubectl run hpcc --image=registry.jojoc4.ch/tm-hpcc --env="CONTROLPLANEIP=$CONTROLPLANEIP" --env="SYSTEM=$SYSTEM" --env="TYPE=$TYPE" --restart=Never --request-timeout=0
1) k0s kubectl run hpcc --image=jojoc4/lsbs-hpcc --env="CONTROLPLANEIP=$CONTROLPLANEIP" --env="SYSTEM=$SYSTEM" --env="TYPE=$TYPE" --restart=Never --request-timeout=0
while [[ $(k0s kubectl get pods hpcc --no-headers -o custom-columns=":status.phase") != "Succeeded" ]]; do
sleep 1
done
k0s kubectl delete pod hpcc --now
;;
2) k0s kubectl run fio --image=registry.jojoc4.ch/tm-fio --env="CONTROLPLANEIP=$CONTROLPLANEIP" --env="SYSTEM=$SYSTEM" --env="TYPE=$TYPE" --restart=Never --request-timeout=0
2) k0s kubectl run fio --image=jojoc4/lsbs-fio --env="CONTROLPLANEIP=$CONTROLPLANEIP" --env="SYSTEM=$SYSTEM" --env="TYPE=$TYPE" --restart=Never --request-timeout=0
while [[ $(k0s kubectl get pods fio --no-headers -o custom-columns=":status.phase") != "Succeeded" ]]; do
sleep 1
done
Expand All @@ -64,7 +64,7 @@ case "$BENCHMARK" in
done
k0s kubectl delete pod iperf --now
;;
4) k0s kubectl run blender --image=registry.jojoc4.ch/tm-blender --env="CONTROLPLANEIP=$CONTROLPLANEIP" --env="SYSTEM=$SYSTEM" --env="TYPE=$TYPE" --restart=Never --request-timeout=0
4) k0s kubectl run blender --image=jojoc4/lsbs-blender --env="CONTROLPLANEIP=$CONTROLPLANEIP" --env="SYSTEM=$SYSTEM" --env="TYPE=$TYPE" --restart=Never --request-timeout=0
while [[ $(k0s kubectl get pods blender --no-headers -o custom-columns=":status.phase") != "Succeeded" ]]; do
sleep 1
done
Expand All @@ -76,13 +76,13 @@ case "$BENCHMARK" in
done
k0s kubectl delete pod bdd --now
;;
6) k0s kubectl run dl --image=registry.jojoc4.ch/tm-dl --env="CONTROLPLANEIP=$CONTROLPLANEIP" --env="SYSTEM=$SYSTEM" --env="TYPE=$TYPE" --restart=Never --request-timeout=0
6) k0s kubectl run dl --image=jojoc4/lsbs-dl --env="CONTROLPLANEIP=$CONTROLPLANEIP" --env="SYSTEM=$SYSTEM" --env="TYPE=$TYPE" --restart=Never --request-timeout=0
while [[ $(k0s kubectl get pods dl --no-headers -o custom-columns=":status.phase") != "Succeeded" ]]; do
sleep 1
done
k0s kubectl delete pod dl --now
;;
7) k0s kubectl run rest --image=registry.jojoc4.ch/tm-rest --env="CONTROLPLANEIP=$CONTROLPLANEIP" --env="SYSTEM=$SYSTEM" --env="TYPE=$TYPE" --env="SERVERNAME=$SERVERNAME" --restart=Never --request-timeout=0 --port=5000
7) k0s kubectl run rest --image=jojoc4/lsbs-rest --env="CONTROLPLANEIP=$CONTROLPLANEIP" --env="SYSTEM=$SYSTEM" --env="TYPE=$TYPE" --env="SERVERNAME=$SERVERNAME" --restart=Never --request-timeout=0 --port=5000
k0s kubectl expose --type=NodePort pod rest --port 5000 --name web --overrides '{ "apiVersion": "v1","spec":{"ports": [{"port":5000,"protocol":"TCP","targetPort":5000,"nodePort":30500}]}}'
while [[ $(k0s kubectl get pods rest --no-headers -o custom-columns=":status.phase") != "Succeeded" ]]; do
sleep 1
Expand Down
2 changes: 1 addition & 1 deletion Benchmarks/files/rest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ubuntu:20.04
RUN apt update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt install -y python3-pip curl
ADD ./* /bench/
ADD ./Benchmarks/files/rest/* /bench/
RUN chmod +x /bench/run.sh
WORKDIR /bench/
RUN pip install -r requirements.txt
Expand Down

0 comments on commit 188f538

Please sign in to comment.