Skip to content

Instantly share code, notes, and snippets.

@syed-ahmed
Last active September 3, 2019 15:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save syed-ahmed/22764e5d1febadb23c112709f1802032 to your computer and use it in GitHub Desktop.
Save syed-ahmed/22764e5d1febadb23c112709f1802032 to your computer and use it in GitHub Desktop.
Dockerfile for IC research
FROM ubuntu:18.04
ARG PYTHON_VERSION=3.6
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates wget \
gnupg2 \
build-essential \
cmake \
git \
curl \
ca-certificates \
libjpeg-dev \
libedit-dev \
subversion swig \
libncurses5-dev \
libpng-dev && \
rm -rf /var/lib/apt/lists/*
RUN curl -o ~/miniconda.sh -O https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
chmod +x ~/miniconda.sh && \
~/miniconda.sh -b -p /opt/conda && \
rm ~/miniconda.sh && \
/opt/conda/bin/conda install -y python=$PYTHON_VERSION numpy pyyaml scipy ipython ninja cython typing && \
/opt/conda/bin/conda clean -ya
ENV PATH /opt/conda/bin:$PATH
# Install clang-9
WORKDIR /opt/LLVM
RUN git clone https://github.com/llvm/llvm-project.git && \
git clone https://github.com/tensorflow/mlir llvm-project/llvm/projects/mlir && \
mkdir llvm-project/build && \
cd llvm-project/build && \
cmake -G Ninja ../llvm \
-DCMAKE_BUILD_TYPE="Release" \
-DLLVM_USE_LINKER=gold \
-DLLVM_BUILD_EXAMPLES=ON \
-DLLVM_TARGETS_TO_BUILD="host" \
-DLLVM_ENABLE_PROJECTS="clang;lldb;compiler-rt;lld;polly;debuginfo-tests" && \
cmake --build . --target install
WORKDIR /workspace
RUN chmod -R a+w .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment