Roofline analysis of AI models
docker-compose up --build
docker build -t roofline-radar .
docker run -p 8501:8501 roofline-radar
Then open http://localhost:8501 in your browser.
Create a setup.sh file:
mkdir -p ~/.streamlit/
echo "\
[server]\n\
headless = true\n\
port = \$PORT\n\
enableCORS = false\n\
\n\
" > ~/.streamlit/config.toml
Create a Procfile:
web: sh setup.sh && streamlit run app.py
# Login to Heroku
heroku login
# Create a new Heroku app
heroku create roofline-radar
# Deploy using Git
git add .
git commit -m "Prepare for Heroku deployment"
git push heroku main
# Open the app
heroku open
heroku logs --tail
# Login to Heroku container registry
heroku container:login
# Create a new app (if not already created)
heroku create roofline-radar
# Build and push the Docker image
heroku container:push web -a roofline-radar
# Release the container
heroku container:release web -a roofline-radar
# Open the app
heroku open -a roofline-radar
Note: For Docker deployment on Heroku, update the Dockerfile to use the $PORT environment variable:
ENTRYPOINT ["sh", "-c", "streamlit run app.py --server.port=$PORT --server.address=0.0.0.0"]