Skip to content

Commit

Permalink
Initial image for mlperf
Browse files Browse the repository at this point in the history
  • Loading branch information
knikolla committed Oct 8, 2024
1 parent 83a5c2b commit 0068480
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/build-mlperf-storage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Build

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

on:
push:
branches: [main]
# Publish semver tags as releases.
tags: ['v*.*.*']
pull_request:
branches: [main]

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}


jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}
type=ref,event=branch
type=ref,event=pr
type=sha
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM ubuntu:24.04

RUN apt update && \
apt install -y git bc mpich python3 python3-pip

RUN git clone -b v1.0 --recurse-submodules https://github.com/mlcommons/storage.git

WORKDIR /storage

RUN pip3 install --break-system-packages -r dlio_benchmark/requirements.txt

COPY entrypoint.sh /storage/entrypoint.sh

RUN chmod -R g+rwX /storage

ENTRYPOINT ["./entrypoint.sh"]
23 changes: 23 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env sh
mkdir /tmp/results

./benchmark.sh datagen \
--hosts localhost \
--workload unet3d \
--accelerator-type a100 \
--num-parallel 1 \
--results-dir /tmp/results \
--param dataset.num_files_train=1200 \
--param dataset.data_folder=unet3d_data

./benchmark.sh run \
--hosts localhost \
--workload unet3d \
--accelerator-type a100 \
--num-accelerators 1 \
--results-dir /tmp/results \
--param dataset.num_files_train=1200 \
--param dataset.data_folder=unet3d_data

cat /tmp/results/per_epoch_statsh.json
cat /tmp/results/summary.json

0 comments on commit 0068480

Please sign in to comment.