Standalone binary (#546)
* Add cmake function to create standalone binary
* Mention licenses used by dependencies in the LICENSE file
* Add test cases for standalone binary by adding --call-binary option for pytest
* Docker compose file to create standalone binary in standardized RHEL 8 environment
* Add README instructions on how to create and test standalone binary
* Move docker files from utils to docker folder; Add standalone binary testing instructions
* Add CHANGELOG statement
* Use different service names in docker compose files
* Use volume mounting in docker files
[ROCm/rocprofiler-compute commit: 40f79c28b1]
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
FROM redhat/ubi8:8.10-1184
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN yum install -y curl gcc cmake
|
||||
|
||||
RUN yum install -y python38 python38-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
|
||||
|
||||
CMD ["/bin/bash", "-c", "\
|
||||
python3.8 -m pip install -r requirements.txt \
|
||||
&& python3.8 -m pip install nuitka patchelf \
|
||||
&& rm -rf build \
|
||||
&& cmake -B build -S . \
|
||||
&& make -C build standalonebinary \
|
||||
"]
|
||||
@@ -0,0 +1,27 @@
|
||||
# Use a base image
|
||||
FROM rocm/dev-ubuntu-22.04
|
||||
|
||||
# Set the working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Update package list and install prerequisites
|
||||
RUN apt-get update && apt-get install -y \
|
||||
software-properties-common cmake locales \
|
||||
&& add-apt-repository ppa:deadsnakes/ppa \
|
||||
&& apt-get update
|
||||
|
||||
# Generate the desired locale
|
||||
RUN locale-gen en_US.UTF-8
|
||||
|
||||
# Install Python 3.10 and pip
|
||||
RUN apt-get install -y python3.10 python3.10-venv python3.10-dev python3-pip
|
||||
|
||||
# Set Python 3.10 as the default python3
|
||||
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1
|
||||
|
||||
# Install any dependencies specified in requirements.txt
|
||||
# Run interactive bash shell
|
||||
CMD ["/bin/bash", "-c", "\
|
||||
python3.10 -m pip install -r requirements.txt -r requirements-test.txt \
|
||||
&& exec /bin/bash \
|
||||
"]
|
||||
@@ -0,0 +1,12 @@
|
||||
services:
|
||||
standalone:
|
||||
build:
|
||||
context: ../
|
||||
dockerfile: docker/Dockerfile.standalone
|
||||
devices:
|
||||
- /dev/kfd
|
||||
- /dev/dri
|
||||
security_opt:
|
||||
- seccomp:unconfined
|
||||
volumes:
|
||||
- ../:/app
|
||||
@@ -0,0 +1,12 @@
|
||||
services:
|
||||
test:
|
||||
build:
|
||||
context: ../
|
||||
dockerfile: docker/Dockerfile.test
|
||||
devices:
|
||||
- /dev/kfd
|
||||
- /dev/dri
|
||||
security_opt:
|
||||
- seccomp:unconfined
|
||||
volumes:
|
||||
- ../:/app
|
||||
Fai riferimento in un nuovo problema
Block a user