Dateien

Revisionen in .git-blame-ignore-revs werden ignoriert. Klicke hier, um das zu umgehen und die normale Blame-Ansicht zu sehen.

53 Zeilen
1.9 KiB
Docker

2025-06-17 16:18:35 -04:00
# Use a base image
FROM ubuntu:22.04
2025-06-17 16:18:35 -04:00
# Install curl first (needed for ROCm download)
RUN apt-get update && apt-get install -y curl
# Define the tarball name as a variable
# Check https://therock-nightly-tarball.s3.amazonaws.com/index.html for latest builds
# Use therock-dist-linux-gfx<arch>-dcgpu-<rocm-version>.tar.gz naming convention
ARG TARBALL_NAME=<tarball_name>
# Install ROCm from TheRock Nightly build
RUN mkdir -p /rocm && \
curl -fLO https://therock-nightly-tarball.s3.amazonaws.com/${TARBALL_NAME} && \
tar -xf ${TARBALL_NAME} -C /rocm && \
rm ${TARBALL_NAME}
# Set environment variables for ROCm
ENV PATH="/rocm/bin:${PATH}" \
ROCM_PATH="/rocm" \
LD_LIBRARY_PATH="/rocm/lib:/rocm/lib/rocm_sysdeps/lib:${LD_LIBRARY_PATH}" \
HIP_DEVICE_LIB_PATH="/rocm/llvm/amdgcn/bitcode" \
HIP_PLATFORM=amd
2025-06-17 16:18:35 -04:00
# Update package list and install prerequisites
RUN apt-get update && apt-get install -y \
software-properties-common cmake locales git \
2025-06-17 16:18:35 -04:00
&& 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 libsqlite3-dev
RUN python3.10 -m venv /venv
ENV PATH="/venv/bin:$PATH"
2025-10-01 01:18:41 +05:30
RUN python -m pip install --upgrade pip
2025-06-17 16:18:35 -04:00
# Install any rocprofiler-compute dependencies specified in requirements.txt
2025-10-01 01:18:41 +05:30
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
RUN python -m pip install -r /app/projects/rocprofiler-compute/requirements.txt -r /app/projects/rocprofiler-compute/requirements-test.txt
# Set the working directory
WORKDIR /app/projects/rocprofiler-compute
# Allows running git commands in /app
RUN git config --global --add safe.directory /app
2025-10-01 01:18:41 +05:30
2025-06-17 16:18:35 -04:00
# Run interactive bash shell
2025-10-01 01:18:41 +05:30
CMD ["/bin/bash"]