diff --git a/ci/Dockerfile.Ubuntu.18.04 b/ci/Dockerfile.Ubuntu.18.04 new file mode 100644 index 0000000000000..7c98ac403312b --- /dev/null +++ b/ci/Dockerfile.Ubuntu.18.04 @@ -0,0 +1,100 @@ +# Taichi Dockerfile for development +FROM nvidia/cudagl:11.2.2-devel-ubuntu18.04 +# Use 11.2 instead of 11.4 to avoid forward compatibility issue on Nvidia driver 460 + +ENV NVIDIA_DRIVER_CAPABILITIES compute,graphics,utility +ENV DEBIAN_FRONTEND=noninteractive +LABEL maintainer="https://github.com/taichi-dev" + +RUN apt-get update && \ + apt-get install -y software-properties-common \ + python3-pip \ + libtinfo-dev \ + clang-10 \ + wget \ + git \ + unzip \ + libxrandr-dev \ + libxinerama-dev \ + libxcursor-dev \ + libxi-dev \ + libglu1-mesa-dev \ + freeglut3-dev \ + mesa-common-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 \ + libvulkan-dev + +# Install the latest version of CMAKE v3.20.5 from source +WORKDIR / +RUN wget https://github.com/Kitware/CMake/releases/download/v3.20.5/cmake-3.20.5-linux-x86_64.tar.gz +RUN tar xf cmake-3.20.5-linux-x86_64.tar.gz && \ + rm cmake-3.20.5-linux-x86_64.tar.gz +ENV PATH="/cmake-3.20.5-linux-x86_64/bin:$PATH" + +# Intall LLVM 10 +WORKDIR / +# Make sure this URL gets updated each time there is a new prebuilt bin release +RUN wget https://github.com/taichi-dev/taichi_assets/releases/download/llvm10_linux_patch2/taichi-llvm-10.0.0-linux.zip +RUN unzip taichi-llvm-10.0.0-linux.zip && \ + rm taichi-llvm-10.0.0-linux.zip +ENV PATH="/taichi-llvm-10.0.0-linux/bin:$PATH" +# Use Clang as the default compiler +ENV CC="clang-10" +ENV CXX="clang++-10" + +# Setting up Vulkan SDK +# References +# [1] https://github.com/edowson/docker-nvidia-vulkan +# [2] https://gitlab.com/nvidia/container-images/vulkan/-/tree/master/docker +WORKDIR /vulkan +RUN wget https://sdk.lunarg.com/sdk/download/1.2.189.0/linux/vulkansdk-linux-x86_64-1.2.189.0.tar.gz +RUN tar xf vulkansdk-linux-x86_64-1.2.189.0.tar.gz && \ + rm vulkansdk-linux-x86_64-1.2.189.0.tar.gz +# Locate Vulkan components +ENV VULKAN_SDK="/vulkan/1.2.189.0/x86_64" +ENV PATH="$VULKAN_SDK/bin:$PATH" +ENV LD_LIBRARY_PATH="$VULKAN_SDK/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" +ENV VK_LAYER_PATH="$VULKAN_SDK/etc/vulkan/explicit_layer.d" +WORKDIR /usr/share/vulkan/icd.d +COPY ci/vulkan/icd.d/nvidia_icd.json nvidia_icd.json + +# Create non-root user for running the container +RUN useradd -ms /bin/bash 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" diff --git a/ci/Dockerfile.Ubuntu.20.04 b/ci/Dockerfile.Ubuntu.20.04 index 6622c00f1552d..1fefde01c5cc2 100644 --- a/ci/Dockerfile.Ubuntu.20.04 +++ b/ci/Dockerfile.Ubuntu.20.04 @@ -6,7 +6,6 @@ ENV NVIDIA_DRIVER_CAPABILITIES compute,graphics,utility ENV DEBIAN_FRONTEND=noninteractive LABEL maintainer="https://github.com/taichi-dev" -# Ubuntu 20.04 installs Python 3.8 by default RUN apt-get update && \ apt-get install -y software-properties-common \ python3-pip \