From 476aa7391cba3a120fba39b7216b6f82762c9dfa Mon Sep 17 00:00:00 2001 From: Tongze Wang Date: Tue, 10 Sep 2024 14:19:34 -0700 Subject: [PATCH] feat: apt clean --- base.dockerfile | 2 +- blender.dockerfile | 8 ++++---- tensorflow.dockerfile | 14 +++++--------- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/base.dockerfile b/base.dockerfile index 819f42e..6b2921b 100644 --- a/base.dockerfile +++ b/base.dockerfile @@ -45,7 +45,7 @@ EOF # Install ROCm RUN < Ref: https://github.com/xuhuisheng/rocm-gfx803/blob/master/blender.md RUN sed -i 's/__noinline__/__inline__/g' intern/cycles/kernel/device/hip/compat.h @@ -31,6 +31,6 @@ RUN cmake \ RUN make -j$(nproc) RUN cpack -G TXZ -RUN cp $(ls -l blender*.tar.xz | cut -d' ' -f9 | tr -d '\n') /home/rocm/blender.tar.xz +RUN cp $(ls -l blender*.tar.xz | awk '{ print $9 }' | tail -n1 | tr -d '\n') /home/rocm/blender.tar.xz CMD ["bash", "-l"] diff --git a/tensorflow.dockerfile b/tensorflow.dockerfile index 1db4bbe..1512b49 100644 --- a/tensorflow.dockerfile +++ b/tensorflow.dockerfile @@ -7,31 +7,27 @@ ARG PYTHON_VERSION="3.11" ARG NUMPY_VERSION="1.22.4" ARG DEBIAN_FRONTEND="noninteractive" -RUN sudo apt-get update && \ -sudo apt-get install -y rocm-libs && \ -sudo rm -rf /var/lib/apt/lists/* - -WORKDIR /home/rocm - # Add GPU target RUN bash -c 'echo -e "gfx803\ngfx900" | sudo tee /opt/rocm/bin/target.lst' # Install bazelisk RUN sudo wget -O /usr/local/bin/bazel https://github.com/bazelbuild/bazelisk/releases/download/v1.21.0/bazelisk-linux-amd64 && sudo chmod 755 /usr/local/bin/bazel +WORKDIR /home/rocm RUN git clone --depth 1 https://github.com/ROCm/tensorflow-upstream.git -b ${TENSORFLOW_BRANCH} tensorflow -WORKDIR /home/rocm/tensorflow - RUN < Ref: https://github.com/ROCm/ROCm/issues/1880 RUN python${PYTHON_VERSION} -m pip install -U --user pip numpy==${NUMPY_VERSION} wheel packaging requests opt_einsum patchelf @@ -43,7 +39,7 @@ RUN sudo ln -s /usr/bin/python${PYTHON_VERSION} /usr/bin/python RUN ./build_rocm_python3 /opt/rocm WORKDIR /tmp/tensorflow_pkg -RUN cp (ls -l tensorflow*.whl | cut -d' ' -f9 | tr -d '\n') /home/rocm/tensorflow-rocm.whl +RUN cp (ls -l tensorflow*.whl | awk '{ print $9 }' | tail -n1 | tr -d '\n') /home/rocm/tensorflow-rocm.whl WORKDIR /home/rocm CMD [ "/bin/bash", "-l" ]