Skip to content

Commit

Permalink
Add pytorch-benchmark image
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Davidson committed Sep 22, 2023
1 parent 1de85bf commit f749954
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/publish-benchmark-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- component: mpi-benchmarks
- component: openfoam
- component: perftest
- component: pytorch-benchmarks
steps:
- name: Check out the repository
uses: actions/checkout@v2
Expand Down
13 changes: 13 additions & 0 deletions images/pytorch-benchmarks/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# TODO: Try newer versions of base image - 23.08 fails with
# 'CUDA on host is too old' type error but something in between
# should work. Latest 23.08 might also work on Ubuntu-22.04.
FROM nvcr.io/nvidia/pytorch:22.12-py3

RUN pip install -U pip
RUN pip install torchvision torchaudio
RUN git clone https://github.com/pytorch/benchmark
WORKDIR /workspace/benchmark
# Add other benchmarks here?
RUN python install.py alexnet resnet50 llama

COPY run-benchmark.sh /usr/local/bin/
3 changes: 3 additions & 0 deletions images/pytorch-benchmarks/run-benchmark.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
# Env vars should be set in container spec
python run.py $BENCHMARK_NAME -t $BENCHMARK_TYPE -d $BENCHMARK_DEVICE --bs $INPUT_DATA_BATCH_SIZE

0 comments on commit f749954

Please sign in to comment.