ee9e74df21
git-subtree-dir: projects/rocprofiler-compute git-subtree-mainline:8a4d7262f8git-subtree-split:d2cec00116
50 lines
1.6 KiB
Docker
50 lines
1.6 KiB
Docker
# Use a base image
|
|
FROM 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 git curl \
|
|
&& add-apt-repository ppa:deadsnakes/ppa \
|
|
&& apt-get update
|
|
|
|
# Allows running git commands in /app
|
|
RUN git config --global --add safe.directory /app
|
|
|
|
# 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
|
|
|
|
# Update pip
|
|
RUN apt remove -y python3-wheel
|
|
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
|
RUN python3.10 get-pip.py
|
|
RUN python3.10 -m pip install --upgrade pip setuptools wheel
|
|
|
|
# Set Python 3.10 as the default python3
|
|
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1
|
|
|
|
# Remove blinker python package
|
|
RUN apt-get remove -y python3-blinker
|
|
|
|
# Install rocm
|
|
# Define custom version
|
|
ARG DEB_FILE=""
|
|
ARG AMDGPU_BUILD=""
|
|
ARG ROCM_BUILD=""
|
|
RUN curl -O "https://artifactory-cdn.amd.com/artifactory/list/amdgpu-deb/${DEB_FILE}"
|
|
RUN apt-get install -y "./${DEB_FILE}"
|
|
RUN amdgpu-repo --amdgpu-build="${AMDGPU_BUILD}" --rocm-build="compute-rocm-dkms-no-npi-hipclang/${ROCM_BUILD}"
|
|
RUN DEBIAN_FRONTEND=noninteractive TZ="America/Toronto" amdgpu-install --yes --usecase=rocm
|
|
|
|
# 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 \
|
|
"]
|