Skip to content

Commit

Permalink
Add the base image for 18.04
Browse files Browse the repository at this point in the history
  • Loading branch information
qiao-bo committed Oct 19, 2021
1 parent 8cedde9 commit 4b38574
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 1 deletion.
100 changes: 100 additions & 0 deletions ci/Dockerfile.Ubuntu.18.04
Original file line number Diff line number Diff line change
@@ -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"
1 change: 0 additions & 1 deletion ci/Dockerfile.Ubuntu.20.04
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 4b38574

Please sign in to comment.