feat: basic tf

This commit is contained in:
2024-09-09 17:32:01 -07:00
parent fd6beb475d
commit ba0d57e53b
2 changed files with 43 additions and 0 deletions
+2
View File
@@ -15,6 +15,8 @@ WORKDIR /home/rocm/blender
RUN ./build_files/build_environment/install_linux_packages.py RUN ./build_files/build_environment/install_linux_packages.py
RUN ./build_files/utils/make_update.py --use-linux-libraries RUN ./build_files/utils/make_update.py --use-linux-libraries
RUN sudo apt clean && sudo rm -rf /var/lib/apt/lists/*
# > Ref: https://github.com/xuhuisheng/rocm-gfx803/blob/master/blender.md # > 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 # RUN sed -i 's/__noinline__/__inline__/g' intern/cycles/kernel/device/hip/compat.h
RUN sed -i 's/major >= 9/major >= 8/g' intern/cycles/device/hip/util.h RUN sed -i 's/major >= 9/major >= 8/g' intern/cycles/device/hip/util.h
+41
View File
@@ -0,0 +1,41 @@
FROM wtongze/rocm-base:5.7.3
ARG PYTHON_VERSION="3.11.10"
ARG TENSORFLOW_BRANCH="r2.13-rocm-enhanced"
ARG DEBIAN_FRONTEND="noninteractive"
RUN sudo apt-get update && \
sudo apt install -y build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev curl git \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev \
&& sudo rm -rf /var/lib/apt/lists/*
WORKDIR /home/rocm
RUN curl https://pyenv.run | bash
ENV PYENV_ROOT=/home/rocm/.pyenv
ENV PATH=$PYENV_ROOT/bin:$PYENV_ROOT/shims:$PATH
RUN pyenv install ${PYTHON_VERSION}
# RUN wget https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz
# RUN tar -xvf clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04.tar.xz
# RUN sudo cp -r clang+llvm-17.0.6-x86_64-linux-gnu-ubuntu-22.04/* /usr
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
RUN git clone -b ${TENSORFLOW_BRANCH} https://github.com/ROCm/tensorflow-upstream.git tensorflow
WORKDIR /home/rocm/tensorflow
RUN pyenv global ${PYTHON_VERSION}
RUN sudo apt-get update && \
sudo apt install -y rocm-libs && \
sudo rm -rf /var/lib/apt/lists/*
# TODO: Causing problems....
RUN sudo pip install numpy==1.26.0 wheel mock future pyyaml setuptools keras_preprocessing keras_applications jupyter patchelf --upgrade
# RUN ./build_rocm_python3 /opt/rocm
CMD [ "/bin/bash", "-l" ]