Fix ctest and docker to work with monorepo (#181)

* Remove .git folder and git command check in cmake

* Update docker container to work in monorepo
    * Update docker container to mount the top level folder in monorepo
This commit is contained in:
vedithal-amd
2025-08-08 10:26:57 -04:00
کامیت شده توسط GitHub
والد 891b07aa5a
کامیت 97d9f35033
3فایلهای تغییر یافته به همراه12 افزوده شده و 22 حذف شده
@@ -42,17 +42,13 @@ include(ExternalProject)
include(GNUInstallDirs)
# version control info
find_package(Git)
if(Git_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
execute_process(
COMMAND git log --pretty=format:%h -n 1
OUTPUT_VARIABLE ROCPROFCOMPUTE_GIT_REV
OUTPUT_STRIP_TRAILING_WHITESPACE)
message(STATUS "Git revision: ${ROCPROFCOMPUTE_GIT_REV}")
set(GIT_CLONE TRUE)
else()
set(GIT_CLONE FALSER)
endif()
execute_process(
COMMAND git log --pretty=format:%h -n 1
OUTPUT_VARIABLE ROCPROFCOMPUTE_GIT_REV
OUTPUT_STRIP_TRAILING_WHITESPACE)
message(STATUS "Git revision: ${ROCPROFCOMPUTE_GIT_REV}")
configure_file(${PROJECT_SOURCE_DIR}/cmake/VERSION.sha.in
${PROJECT_SOURCE_DIR}/VERSION.sha @ONLY)
set(CMAKE_BUILD_TYPE "Release")
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
@@ -162,12 +158,6 @@ if(LOCALHOST MATCHES "TheraS01|.*\.thera\.amd\.com|thera-hn")
list(POP_BACK CMAKE_MESSAGE_INDENT)
endif()
# git versioning file
if(${GIT_CLONE})
configure_file(${PROJECT_SOURCE_DIR}/cmake/VERSION.sha.in
${PROJECT_SOURCE_DIR}/VERSION.sha @ONLY)
endif()
# Setup testing collateral
option(ENABLE_TESTS "Enable compilation of testing collateral" OFF)
@@ -44,6 +44,7 @@ RUN DEBIAN_FRONTEND=noninteractive TZ="America/Toronto" amdgpu-install --yes --u
# 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 \
cd /app/projects/rocprofiler-compute \
&& python3.10 -m pip install -r requirements.txt -r requirements-test.txt \
&& exec /bin/bash \
"]
@@ -1,16 +1,15 @@
services:
customrocmtest: # service name
build:
context: ../
dockerfile: docker/Dockerfile.customrocmtest
context: ../../../
dockerfile: projects/rocprofiler-compute/docker/Dockerfile.customrocmtest
devices:
- /dev/kfd
- /dev/dri
security_opt:
- seccomp:unconfined
volumes:
- ../:/app
- ../../rocprofiler-sdk:/rocprofiler-sdk
- ../../../:/app
ports:
- 8050:8050
tty: true