|
| 1 | +# Taichi Dockerfile for development |
| 2 | +FROM rocm/dev-ubuntu-18.04:5.2 |
| 3 | + |
| 4 | +ENV DEBIAN_FRONTEND=noninteractive |
| 5 | + |
| 6 | +LABEL maintainer="https://github.com/taichi-dev" |
| 7 | + |
| 8 | +RUN apt-get update && \ |
| 9 | + apt-get install -y software-properties-common && add-apt-repository -y ppa:git-core/ppa && apt-get update && \ |
| 10 | + apt-get install -y python3-pip \ |
| 11 | + libtinfo-dev \ |
| 12 | + sudo \ |
| 13 | + clang-10 \ |
| 14 | + wget \ |
| 15 | + git \ |
| 16 | + unzip \ |
| 17 | + ffmpeg \ |
| 18 | + libxrandr-dev \ |
| 19 | + libxinerama-dev \ |
| 20 | + libxcursor-dev \ |
| 21 | + libxi-dev \ |
| 22 | + libglu1-mesa-dev \ |
| 23 | + freeglut3-dev \ |
| 24 | + mesa-common-dev \ |
| 25 | + libssl-dev \ |
| 26 | + libglm-dev \ |
| 27 | + libxcb-keysyms1-dev \ |
| 28 | + libxcb-dri3-dev \ |
| 29 | + libxcb-randr0-dev \ |
| 30 | + libxcb-ewmh-dev \ |
| 31 | + libpng-dev \ |
| 32 | + g++-multilib \ |
| 33 | + libmirclient-dev \ |
| 34 | + libwayland-dev \ |
| 35 | + bison \ |
| 36 | + libx11-xcb-dev \ |
| 37 | + liblz4-dev \ |
| 38 | + libzstd-dev \ |
| 39 | + qt5-default \ |
| 40 | + libglfw3 \ |
| 41 | + libglfw3-dev \ |
| 42 | + libjpeg-dev \ |
| 43 | + && \ |
| 44 | + printf "root ALL=(ALL:ALL) NOPASSWD: ALL\ndev ALL=(ALL:ALL) NOPASSWD: ALL\n" > /etc/sudoers && \ |
| 45 | + true |
| 46 | + |
| 47 | +# Install LLVM 15 |
| 48 | +WORKDIR / |
| 49 | +# Make sure this URL gets updated each time there is a new prebuilt bin release |
| 50 | +RUN wget https://github.com/GaleSeLee/assets/releases/download/v0.0.1/taichi-llvm-15.0.0-linux.zip |
| 51 | +RUN unzip taichi-llvm-15.0.0-linux.zip && \ |
| 52 | + rm taichi-llvm-15.0.0-linux.zip |
| 53 | +ENV PATH="/taichi-llvm-15.0.0-linux/bin:$PATH" |
| 54 | +# Use Clang as the default compiler |
| 55 | +ENV CC="clang-10" |
| 56 | +ENV CXX="clang++-10" |
| 57 | + |
| 58 | +# Create non-root user for running the container |
| 59 | +RUN useradd -m -s /bin/bash dev && \ |
| 60 | + usermod -a -G video dev && \ |
| 61 | + chmod 666 /dev/kfd && \ |
| 62 | + chmod 666 /dev/dri/* |
| 63 | +WORKDIR /home/dev |
| 64 | +USER dev |
| 65 | + |
| 66 | +# Install miniconda |
| 67 | +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \ |
| 68 | + bash Miniconda3-latest-Linux-x86_64.sh -p /home/dev/miniconda -b |
| 69 | +ENV PATH="/home/dev/miniconda/bin:$PATH" |
| 70 | + |
| 71 | +WORKDIR /home/dev |
| 72 | +ENV LANG="C.UTF-8" |
| 73 | + |
| 74 | +# Set up multi-python environment |
| 75 | +RUN conda init bash |
| 76 | +RUN conda create -n py36 python=3.6 -y |
| 77 | +RUN conda create -n py37 python=3.7 -y |
| 78 | +RUN conda create -n py38 python=3.8 -y |
| 79 | +RUN conda create -n py39 python=3.9 -y |
| 80 | +RUN conda create -n py310 python=3.10 -y |
0 commit comments