From bf761c3481295c071d4ecf2cc2438a6ba6f96518 Mon Sep 17 00:00:00 2001 From: dhosterman Date: Mon, 12 Aug 2024 12:13:06 -0400 Subject: [PATCH] testing workflow --- .github/workflows/docker.yml | 20 ++++++++++++++++++++ Dockerfile | 22 ++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 .github/workflows/docker.yml create mode 100644 Dockerfile diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 00000000..42b80962 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,20 @@ +name: ci + +on: + push: + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build and push + uses: docker/build-push-action@v6 + with: + push: true + tags: ghcr.io/user/app:latest \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..112daf1c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +# Base Stage +FROM python:3.10-slim AS base + +ENV PYTHONFAULTHANDLER=1 \ + PYTHONHASHSEED=random \ + PYTHONUNBUFFERED=1 + +RUN apt-get update \ + && apt-get install -y \ + gcc \ + libffi-dev \ + g++ \ + git + +WORKDIR /app + +# Final Stage +FROM base AS final + +RUN ["pip", "install", "git+https://github.com/mlcommons/modelbench.git"] + +ENTRYPOINT ["modelbench", "benchmark", "-m", "1"] \ No newline at end of file