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. Replace/tmp
in the command below with a different path if you want to store the config files and theFMBench
generated data in a different directory. -
Run
FMBench
with a packaged or a custom config file. The--write-bucket
parameter value is just a placeholder and an actual S3 bucket is not required. You could set the--tmp-dir
flag to an EFA path instead of/tmp
if using a shared path for storing config files and reports. -
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.