Update standalone binary to use python 3.9 (#725)

* Update standalone docker to python 3.9

* Add TUI files

* Fix docker files to work with monorepo

* Update standalone binary documentation
This commit is contained in:
vedithal-amd
2025-08-25 07:57:08 -04:00
zatwierdzone przez GitHub
rodzic a013e141b7
commit 748c9b74d9
4 zmienionych plików z 15 dodań i 11 usunięć
@@ -475,6 +475,7 @@ add_custom_target(
--include-package-data=plotly --include-package=kaleido
--include-package-data=kaleido --include-package=rocprof_compute_analyze
--include-package-data=rocprof_compute_analyze
--include-package=rocprof_compute_tui --include-package-data=rocprof_compute_tui
--include-package=rocprof_compute_soc --include-package-data=rocprof_compute_soc
--include-package=utils --include-package-data=utils rocprof-compute
# Remove library rpath from executable
+5 -3
Wyświetl plik
@@ -56,14 +56,16 @@ NOTE: This Dockerfile uses `ubuntu 22.04` as the base operating system image
To create a standalone binary, run the following commands:
* `cd docker`
* `docker compose -f docker-compose.standalone.yml build`
* `docker compose -f docker-compose.standalone.yml up --force-recreate -d && docker attach docker-standalone-1`
You should find the rocprof-compute.bin standalone binary inside the `build` folder in the root directory of the project.
To build the binary we follow these steps:
* Use RHEL 8 image used to build ROCm as the base image
* Install python3.8
* Install dependencies for runtime and for making standalone binary
* Use RHEL 8.10 docker image as the base image
* Install python3.9
* Install runtime dependencies
* Install dependencies for building standalone binary
* Call the make target which uses Nuitka to build the standalone binary
NOTE: Since RHEL 8 ships with glibc version 2.28, this standalone binary can only be run on environment with glibc version greater than 2.28.
@@ -1,4 +1,4 @@
FROM redhat/ubi8:8.10-1184
FROM redhat/ubi8:8.10
WORKDIR /app
@@ -7,15 +7,16 @@ RUN yum install -y curl gcc cmake git
# Allows running git commands in /app
RUN git config --global --add safe.directory /app
RUN yum install -y python38 python38-devel && \
RUN yum install -y python39 python39-devel && \
yum clean all && \
rm -rf /var/cache/yum && \
curl -sS https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
python3.8 get-pip.py
python3 get-pip.py
CMD ["/bin/bash", "-c", "\
python3.8 -m pip install -r requirements.txt \
&& python3.8 -m pip install nuitka patchelf \
cd /app/projects/rocprofiler-compute \
&& python3 -m pip install -r requirements.txt \
&& python3 -m pip install nuitka patchelf \
&& rm -rf build \
&& cmake -B build -S . \
&& make -C build standalonebinary \
@@ -1,12 +1,12 @@
services:
standalone:
build:
context: ../
dockerfile: docker/Dockerfile.standalone
context: ../../../
dockerfile: projects/rocprofiler-compute/docker/Dockerfile.standalone
devices:
- /dev/kfd
- /dev/dri
security_opt:
- seccomp:unconfined
volumes:
- ../:/app
- ../../../:/app