feat: simplify rocm 4.5+

This commit is contained in:
2024-09-11 21:01:57 -07:00
parent bd42ce0763
commit 2b2d578ab8
3 changed files with 8 additions and 16 deletions
+8
View File
@@ -50,6 +50,14 @@ apt-get clean
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
EOF EOF
# For ROCm 4.5+
RUN <<EOF
sudo apt-get update
sudo apt-get install -y rocm-ml-sdk rocm-hip-sdk || true
sudo apt-get clean
sudo rm -rf /var/lib/apt/lists/*
EOF
# Create non-root user # Create non-root user
RUN <<EOF RUN <<EOF
echo "%sudo ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/sudo-nopasswd echo "%sudo ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/sudo-nopasswd
-8
View File
@@ -29,14 +29,6 @@ EOF
RUN python${PYTHON_VERSION} -m pip install typing-extensions wheel RUN python${PYTHON_VERSION} -m pip install typing-extensions wheel
# For ROCm 4.5+
RUN <<EOF
sudo apt-get update
sudo apt-get install -y rocm-ml-sdk rocm-hip-sdk
sudo apt-get clean
sudo rm -rf /var/lib/apt/lists/*
EOF
RUN <<EOF RUN <<EOF
sudo apt-get update sudo apt-get update
sudo apt-get install -y ninja-build sudo apt-get install -y ninja-build
-8
View File
@@ -18,14 +18,6 @@ RUN sudo wget -O /usr/local/bin/bazel https://github.com/bazelbuild/bazelisk/rel
WORKDIR /home/rocm WORKDIR /home/rocm
RUN git clone --depth 1 https://github.com/ROCm/tensorflow-upstream.git -b ${TENSORFLOW_BRANCH} tensorflow RUN git clone --depth 1 https://github.com/ROCm/tensorflow-upstream.git -b ${TENSORFLOW_BRANCH} tensorflow
# For ROCm 4.5+
RUN <<EOF
sudo apt-get update
sudo apt-get install -y rocm-ml-sdk rocm-hip-sdk
sudo apt-get clean
sudo rm -rf /var/lib/apt/lists/*
EOF
RUN <<EOF RUN <<EOF
sudo apt-get update sudo apt-get update
sudo apt install -y software-properties-common sudo apt install -y software-properties-common