From 2f6dd0fe7966b6a9ab47cea4350d74a93908839d Mon Sep 17 00:00:00 2001 From: Zeyu Li Date: Thu, 24 Nov 2022 16:54:06 +0800 Subject: [PATCH] [ci] Add dockerfile.ubuntu-20.04.amdgpu (#6711) Issue: https://github.com/taichi-dev/taichi/issues/6434 ### Brief Summary This dockerfile refs to Dockerfile.ubuntu.20.04. The differences are following 1. based docker image 2. del python3-pip, mesa-common-dev which are already downloaded in based image. 3. remove vulkan module(amdgpu is not yet adapted to vulkan) 4. add user into video usergroup. (Some Ubuntu-20.04 versions also require render group) --- ci/Dockerfile.ubuntu.20.04.amdgpu | 73 +++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 ci/Dockerfile.ubuntu.20.04.amdgpu diff --git a/ci/Dockerfile.ubuntu.20.04.amdgpu b/ci/Dockerfile.ubuntu.20.04.amdgpu new file mode 100644 index 0000000000000..1565ad79c7ca3 --- /dev/null +++ b/ci/Dockerfile.ubuntu.20.04.amdgpu @@ -0,0 +1,73 @@ +# Taichi Dockerfile for development +FROM rocm/dev-ubuntu-20.04:5.2 + +LABEL maintainer="https://github.com/taichi-dev" + +RUN apt-get update && \ + apt-get install -y software-properties-common && \ + apt-get install -y libtinfo-dev \ + clang-10 \ + wget \ + git \ + unzip \ + ffmpeg \ + libxrandr-dev \ + libxinerama-dev \ + libxcursor-dev \ + libxi-dev \ + libglu1-mesa-dev \ + freeglut3-dev \ + libssl-dev \ + libglm-dev \ + libxcb-keysyms1-dev \ + libxcb-dri3-dev \ + libxcb-randr0-dev \ + libxcb-ewmh-dev \ + libpng-dev \ + g++-multilib \ + libmirclient-dev \ + libwayland-dev \ + bison \ + libx11-xcb-dev \ + liblz4-dev \ + libzstd-dev \ + qt5-default \ + libglfw3 \ + libglfw3-dev \ + libjpeg-dev +# Install LLVM 15 +WORKDIR / +# Make sure this URL gets updated each time there is a new prebuilt bin release +RUN wget https://github.com/GaleSeLee/assets/releases/download/v0.0.1/taichi-llvm-15.0.0-linux.zip +RUN unzip taichi-llvm-15.0.0-linux.zip && \ + rm taichi-llvm-15.0.0-linux.zip +ENV PATH="/taichi-llvm-15.0.0-linux/bin:$PATH" +# Use Clang as the default compiler +ENV CC="clang-10" +ENV CXX="clang++-10" + +# Create non-root user for running the container +# add user into video(&&render) group +RUN useradd -ms /bin/bash dev && \ + usermod -a -G video dev +WORKDIR /home/dev +USER dev + +# Install miniconda +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \ + bash Miniconda3-latest-Linux-x86_64.sh -p /home/dev/miniconda -b +ENV PATH="/home/dev/miniconda/bin:$PATH" + +# Set up multi-python environment +RUN conda init bash +RUN conda create -n py36 python=3.6 -y +RUN conda create -n py37 python=3.7 -y +RUN conda create -n py38 python=3.8 -y +RUN conda create -n py39 python=3.9 -y + +# Load scripts for build and test +WORKDIR /home/dev/scripts +COPY ci/scripts/ubuntu_build_test.sh ubuntu_build_test.sh + +WORKDIR /home/dev +ENV LANG="C.UTF-8"