Run FMBench
on Amazon EC2¶
For some enterprise scenarios it might be desirable to run FMBench
directly on an EC2 instance with no dependency on S3. Here are the steps to do this:
-
Have a
t3.xlarge
(or larger) instance in theRunning
stage. Make sure that the instance has at least 50GB of disk space and the IAM role associated with your EC2 instance hasAmazonSageMakerFullAccess
policy associated with it andsagemaker.amazonaws.com
added to its Trust relationships. -
Setup the
fmbench_python311
conda environment. This step required conda to be installed on the EC2 instance, see instructions for downloading Anaconda. -
Create local directory structure needed for
FMBench
and copy all publicly available dependencies from the AWS S3 bucket forFMBench
. This is done by running thecopy_s3_content.sh
script available as part of theFMBench
repo.curl -s https://raw.githubusercontent.com/aws-samples/foundation-model-benchmarking-tool/main/copy_s3_content.sh | sh
-
Run
FMBench
with a quickstart config file. -
Open a new Terminal and navigate to the
foundation-model-benchmarking-tool
directory and do atail
onfmbench.log
to see a live log of the run. -
All metrics are stored in the
/tmp/fmbench-write
directory created automatically by thefmbench
package. Once the run completes all files are copied locally in aresults-*
folder as usual.