mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
This is the first of three PRs that #5537 will be split into. This PR adds mkl headers to included files, and provides helper functions for MKL fft and cuFFT. In particular, on POSIX, headers are using mkl-include from conda, and on Windows, it is from a new file @yf225 and I made and uploaded to s3. * add mkl-include to required packages * include MKL headers; add AT_MKL_ENABLED flag; add a method to query MKL availability * Add MKL and CUFFT helpers
36 lines
1.1 KiB
Docker
36 lines
1.1 KiB
Docker
FROM nvidia/cuda:9.0-cudnn7-devel-ubuntu16.04
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
build-essential \
|
|
cmake \
|
|
git \
|
|
curl \
|
|
vim \
|
|
ca-certificates \
|
|
libjpeg-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 numpy pyyaml scipy ipython mkl mkl-include && \
|
|
/opt/conda/bin/conda install -c soumith magma-cuda90 && \
|
|
/opt/conda/bin/conda clean -ya
|
|
ENV PATH /opt/conda/bin:$PATH
|
|
# This must be done before pip so that requirements.txt is available
|
|
WORKDIR /opt/pytorch
|
|
COPY . .
|
|
|
|
RUN git submodule update --init
|
|
RUN TORCH_CUDA_ARCH_LIST="3.5 5.2 6.0 6.1 7.0+PTX" TORCH_NVCC_FLAGS="-Xfatbin -compress-all" \
|
|
CMAKE_PREFIX_PATH="$(dirname $(which conda))/../" \
|
|
pip install -v .
|
|
|
|
RUN git clone https://github.com/pytorch/vision.git && cd vision && pip install -v .
|
|
|
|
WORKDIR /workspace
|
|
RUN chmod -R a+w /workspace
|