Files
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

55 lines
2.9 KiB
Docker

# Use a base image
FROM ubuntu:22.04
# Update package list and install prerequisites
RUN apt-get update && apt-get install -y \
curl software-properties-common cmake locales git \
&& add-apt-repository ppa:deadsnakes/ppa \
&& apt-get update
# Generate the desired locale
RUN locale-gen en_US.UTF-8
# Install Python 3.12 and pip (use non-interactive to avoid timezone prompt)
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python3.12 python3.12-venv python3.12-dev python3-pip libsqlite3-dev
# Install ROCm from the multi-arch nightly index. GFX_ARCH selects which GPU
# kernels are bundled via the device-* extra (e.g. gfx942 = MI300A/MI300X, or
# use "all" for every arch). Available extras:
# https://github.com/ROCm/TheRock/blob/main/RELEASES.md#supported-python-device--install-extras
# Pin a dated nightly via ROCM_VERSION for reproducibility; bump it manually to
# update. Browse available versions at https://rocm.nightlies.amd.com/whl-multi-arch/rocm/
ARG ROCM_VERSION=<rocm_version>
ARG GFX_ARCH=<gfx_arch>
RUN rm -rf /rocm-venv && python3.12 -m venv /rocm-venv && \
/rocm-venv/bin/pip install --upgrade pip && \
/rocm-venv/bin/pip install \
--index-url https://rocm.nightlies.amd.com/whl-multi-arch/ \
"rocm[profiler,devel,libraries,device-${GFX_ARCH}]==${ROCM_VERSION}"
# Expand the devel tree and link the per-GPU device kernels (.kpack) into it.
RUN /rocm-venv/bin/rocm-sdk init
# Set ROCm environment variables pointing at the devel root, which is the
# complete merged tree (bin/include/lib + linked device kernels).
ENV ROCM_PATH="/rocm-venv/lib/python3.12/site-packages/_rocm_sdk_devel" \
HIP_PATH="/rocm-venv/lib/python3.12/site-packages/_rocm_sdk_devel" \
HIP_DEVICE_LIB_PATH="/rocm-venv/lib/python3.12/site-packages/_rocm_sdk_devel/lib/llvm/amdgcn/bitcode" \
PATH="/rocm-venv/bin:/rocm-venv/lib/python3.12/site-packages/_rocm_sdk_devel/bin:${PATH}" \
LD_LIBRARY_PATH="/rocm-venv/lib/python3.12/site-packages/_rocm_sdk_devel/lib:/rocm-venv/lib/python3.12/site-packages/_rocm_sdk_devel/lib/rocm_sysdeps/lib:${LD_LIBRARY_PATH}"
# Install any rocprofiler-compute dependencies specified in requirements.txt
COPY projects/rocprofiler-compute/requirements.txt /app/projects/rocprofiler-compute/requirements.txt
COPY projects/rocprofiler-compute/requirements-test.txt /app/projects/rocprofiler-compute/requirements-test.txt
COPY projects/rocprofiler-compute/requirements-development.txt /app/projects/rocprofiler-compute/requirements-development.txt
RUN /rocm-venv/bin/pip install -r /app/projects/rocprofiler-compute/requirements.txt -r /app/projects/rocprofiler-compute/requirements-test.txt -r /app/projects/rocprofiler-compute/requirements-development.txt
# Set the working directory
WORKDIR /app/projects/rocprofiler-compute
# Allows running git commands in /app
RUN git config --global --add safe.directory /app
# Run interactive bash shell
CMD ["/bin/bash"]