forked from taichi-dev/taichi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
68 lines (58 loc) · 2.07 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Temporary documentation for this Dockerfile: https://github.com/yuanming-hu/taichi/issues/214
# Contributor: robbertvc and yuanming-hu
FROM nvidia/cuda:10.0-devel-ubuntu16.04
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:jonathonf/python-3.6
RUN apt-get update && apt-get install -y \
build-essential \
python3.6 \
python3.6-dev \
python3-pip \
python3.6-venv \
git \
cmake \
libtinfo-dev \
wget \
libx11-dev \
libsm6 \
libxext6 \
libxrender-dev \
zlib1g-dev \
xz-utils \
curl \
libomp5 \
libomp-dev
RUN curl -SL http://releases.llvm.org/7.0.1/clang+llvm-7.0.1-x86_64-linux-gnu-ubuntu-16.04.tar.xz | tar -xJC . \
&& cp -r clang+llvm-7.0.1-x86_64-linux-gnu-ubuntu-16.04/ /usr/local/clang-7.0.1
ENV LD_LIBRARY_PATH=/usr/local/clang-7.0.1/lib:$LD_LIBRARY_PATH
ENV PATH=/usr/local/clang-7.0.1/bin:$PATH
RUN ldconfig
ENV CC=/usr/local/clang-7.0.1/bin/clang
ENV CXX=/usr/local/clang-7.0.1/bin/clang++
RUN curl -SL https://github.com/llvm/llvm-project/releases/download/llvmorg-8.0.1/llvm-8.0.1.src.tar.xz | tar -xJC .
RUN cd llvm-8.0.1.src && mkdir build && cd build && cmake .. -DLLVM_ENABLE_RTTI:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="X86;NVPTX" -DLLVM_ENABLE_ASSERTIONS=ON && make -j `nproc --all` && make install
# install python dependencies
RUN python3.6 -m pip install \
astpretty \
astor \
pytest \
pybind11 \
Pillow \
numpy \
scipy \
distro
RUN apt-get install -y software-properties-common
RUN add-apt-repository ppa:ubuntu-toolchain-r/test
RUN apt update
RUN apt install g++-7 -y
RUN echo /usr/local/cuda-10.0/compat >> /etc/ld.so.conf.d/cuda-10-0.conf && ldconfig
RUN mkdir /app
WORKDIR /app
ENV SHELL=bash
RUN cd /app && git clone https://github.com/yuanming-hu/taichi.git
RUN cd /app/taichi && python3.6 dev_setup.py
RUN cd /app/taichi && mkdir build && cd build && cmake .. -DPYTHON_EXECUTABLE=python3.6
RUN cd /app/taichi/build && make -j `nproc --all`
WORKDIR /app
CMD /bin/bash