Create a website for FMBench
reports¶
When you use FMBench
as a tool for benchmarking your foundation models you would soon want to have an easy way to view all the reports in one place and search through the results, for example, "Llama3.1-8b
results on trn1.32xlarge
". An FMBench
website provides a simple way of viewing these results.
Here are the steps to setup a website using mkdocs
and nginx
. The steps below generate a self-signed certificate for SSL and use username and password for authentication. It is strongly recommended that you use a valid SSL cert and a better authentication mechanism than username and password for your FMBench
website.
-
Start an Amazon EC2 machine which will host the
FMBench
website. At3.xlarge
machine with an Ubuntu AMI sayubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04-amd64-server-20240801
and 50GB storage is good enough. Allow SSH and TCP port 443 traffic from anywhere into that machine. -
SSH into that machine and install
conda
.wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh bash Miniconda3-latest-Linux-x86_64.sh -b # Run the Miniconda installer in batch mode (no manual intervention) rm -f Miniconda3-latest-Linux-x86_64.sh # Remove the installer script after installation eval "$(/home/$USER/miniconda3/bin/conda shell.bash hook)" # Initialize conda for bash shell conda init # Initialize conda, adding it to the shell
-
Install
docker-compose
. -
Setup the
fmbench_python311
conda environment and cloneFMBench
repo. -
Get the
FMBench
results data from Amazon S3 or whichever storage system you used to store all the results. -
Create a directory for the
1. Setup SSL certs (we strongly encourage you to not use self-signed certs, this step here is just for demo purposes, get SSL certs the same way you get them for your current production workloads).FMBench
website contents. -
Create an
.httpasswd
file. TheFMBench
website will use thefmbench_admin
as a username and a password that you enter as part of the command below to allow login to the website. -
Create the
mkdocs.yml
file for the website. -
Update
nginx.conf
file. Note the hostname that is printed out below, theFMBench
website would be served at this address.TOKEN=`curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600"` HOSTNAME=`curl -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/meta-data/public-hostname` echo "hostname is: $HOSTNAME" sed "s/__HOSTNAME__/$HOSTNAME/g" website/nginx.conf.template > $HOME/fmbench_site/nginx.conf
-
Serve the website.
-
Open a web browser and navigate to the hostname you noted in the step above, for example
https://<your-ec2-hostname>.us-west-2.compute.amazonaws.com
, ignore the security warnings if you used a self-signed SSL cert (replace this with a cert that you would normally use in your production websites) and then enter the username and password (the username would befmbench_admin
and password would be what you had set when running thehtpasswd
command). You should see a website as shown in the screenshot below.