Skip to content

Instantly share code, notes, and snippets.

@KellenSunderland
Created March 5, 2018 10:38
Show Gist options
  • Save KellenSunderland/14778ec80b7bf1a3433811670932242a to your computer and use it in GitHub Desktop.
Save KellenSunderland/14778ec80b7bf1a3433811670932242a to your computer and use it in GitHub Desktop.
Docker layer optimizations
FROM ubuntu:16.04
COPY install/ubuntu_install_core.sh /install/
RUN /install/ubuntu_install_core.sh
COPY install/ubuntu_install_python.sh /install/
RUN /install/ubuntu_install_python.sh
COPY install/ubuntu_install_scala.sh /install/
RUN /install/ubuntu_install_scala.sh
COPY install/ubuntu_install_r.sh /install/
RUN /install/ubuntu_install_r.sh
COPY install/ubuntu_install_perl.sh /install/
RUN /install/ubuntu_install_perl.sh
# Install clang 3.9 (the same version as in XCode 8.*) and 5.0 (latest major release)
RUN wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-3.9 main" && \
apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-5.0 main" && \
apt-get update && \
apt-get install -y clang-3.9 clang-5.0 && \
clang-3.9 --version && \
clang-5.0 --version
# Add MKLML library, compatiable with Ubuntu16.04
RUN wget --no-check-certificate -O /tmp/mklml.tgz https://github.com/intel/mkl-dnn/releases/download/v0.12/mklml_lnx_2018.0.1.20171227.tgz && \
tar -zxvf /tmp/mklml.tgz && \
cp -rf mklml_*/* /usr/local/ && \
rm -rf mklml_* && \
rm /tmp/mklml.tgz
ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
FROM ubuntu:16.04
COPY install/ubuntu_install_core.sh /install/
RUN /install/ubuntu_install_core.sh
COPY install/ubuntu_install_python.sh /install/
RUN /install/ubuntu_install_python.sh
COPY install/ubuntu_install_scala.sh /install/
RUN /install/ubuntu_install_scala.sh
COPY install/ubuntu_install_r.sh /install/
RUN /install/ubuntu_install_r.sh
COPY install/ubuntu_install_perl.sh /install/
RUN /install/ubuntu_install_perl.sh
# Install clang 3.9 (the same version as in XCode 8.*) and 5.0 (latest major release)
RUN wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-3.9 main" && \
apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-5.0 main" && \
apt-get update && \
apt-get install -y clang-3.9 clang-5.0 && \
clang-3.9 --version && \
clang-5.0 --version
# Add MKLML library, compatiable with Ubuntu16.04
RUN wget --no-check-certificate -O /tmp/mklml.tgz https://github.com/intel/mkl-dnn/releases/download/v0.12/mklml_lnx_2018.0.1.20171227.tgz
RUN tar -zxvf /tmp/mklml.tgz && \
cp -rf mklml_*/* /usr/local/ && \
rm -rf mklml_* && \
rm /tmp/mklml.tgz
ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment