From e0460d77c8e76360a845034a9b33c08fe2fa04fc Mon Sep 17 00:00:00 2001 From: colramos-amd Date: Mon, 7 Nov 2022 16:35:41 -0600 Subject: [PATCH] Fixes for install documentation #12 Signed-off-by: colramos-amd [ROCm/rocprofiler-compute commit: 0a655c5f763794714b2cc97f8f69944ab21af555] --- .../src/docs/installation.md | 17 +++++++++++++---- .../src/omniperf_cli/omniperf_cli.py | 3 +-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/projects/rocprofiler-compute/src/docs/installation.md b/projects/rocprofiler-compute/src/docs/installation.md index 7b861adf87..0435efcb59 100644 --- a/projects/rocprofiler-compute/src/docs/installation.md +++ b/projects/rocprofiler-compute/src/docs/installation.md @@ -62,7 +62,7 @@ Next, install Python dependencies and complete the Omniperf configuration/instal $ export INSTALL_DIR= # install python deps -$ python3 -m pip install -t ${INSTALL_DIR}/python-libs -r requirements.txt +$ python3 -m pip install --system -t ${INSTALL_DIR}/python-libs -r requirements.txt # configure Omniperf for shared install $ mkdir build @@ -150,21 +150,30 @@ optional `ROCPROF` environment variable. Note: Server-side setup is not required to profile or analyze performance data from the CLI. It is provided as an additional mechanism to import performance -data for examination within a detailed [Grafana GUI](https://github.com/grafana/grafana). +data for examination within a detailed [Grafana](https://github.com/grafana/grafana) GUI. The recommended process for enabling the server-side of Omniperf is to use the provided Docker file to build the Grafana and MongoDB instance. +### Install MongoDB Utils +Omniperf uses [mongoimport](https://www.mongodb.com/docs/database-tools/mongoimport/) to upload data to Grafana's backend database +```bash +$ wget mongodb-database-tools-ubuntu2004-x86_64-100.6.1.deb +$ sudo apt intall ./mongodb-database-tools-ubuntu2004-x86_64-100.6.1.deb +``` +> Find install for alternative distros [here](https://www.mongodb.com/download-center/database-tools/releases/archive) + ### Persist Storage ```bash $ sudo mkdir -p /usr/local/persist && cd /usr/local/persist/ $ sudo mkdir -p grafana-storage mongodb -$ sudo mkdir -p grafana-storage mongodb +$ sudo docker volume create --driver local --opt type=none --opt device=/usr/local/persist/grafana-storage --opt o=bind grafana-storage +$ sudo docker volume create --driver local --opt type=none --opt device=/usr/local/persist/mongodb --opt o=bind grafana-mongo-db ``` ### Build and Launch ```bash $ sudo docker-compose build -$ sudo docker-compose up +$ sudo docker-compose up -d ``` diff --git a/projects/rocprofiler-compute/src/omniperf_cli/omniperf_cli.py b/projects/rocprofiler-compute/src/omniperf_cli/omniperf_cli.py index b9be57974c..86eebd8ab6 100644 --- a/projects/rocprofiler-compute/src/omniperf_cli/omniperf_cli.py +++ b/projects/rocprofiler-compute/src/omniperf_cli/omniperf_cli.py @@ -34,8 +34,7 @@ import sys -if sys.hexversion < 0x03070000: - sys.exit("Python 3.7 or newer is required.") + import copy import sys