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 theRunningstage. Make sure that the instance has at least 50GB of disk space and the IAM role associated with your EC2 instance hasAmazonSageMakerFullAccesspolicy associated with it andsagemaker.amazonaws.comadded to its Trust relationships. -
Setup the
fmbench_python311conda environment. This step required conda to be installed on the EC2 instance, see instructions for downloading Anaconda. -
Create local directory structure needed for
FMBenchand copy all publicly available dependencies from the AWS S3 bucket forFMBench. This is done by running thecopy_s3_content.shscript available as part of theFMBenchrepo. Replace/tmpin the command below with a different path if you want to store the config files and theFMBenchgenerated data in a different directory. -
Run
FMBenchwith a packaged or a custom config file. The--write-bucketparameter value is just a placeholder and an actual S3 bucket is not required. You could set the--tmp-dirflag to an EFA path instead of/tmpif using a shared path for storing config files and reports. -
Open a new Terminal and navigate to the
foundation-model-benchmarking-tooldirectory and do atailonfmbench.logto see a live log of the run. -
All metrics are stored in the
/tmp/fmbench-writedirectory created automatically by thefmbenchpackage. Once the run completes all files are copied locally in aresults-*folder as usual.