Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Start with cuDNN base image
- FROM nvidia/cuda:10.0-cudnn7-devel-ubuntu18.04
- ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
- ENV PATH /opt/conda/bin:$PATH
- RUN apt-get update --fix-missing && apt-get install -y wget bzip2 ca-certificates \
- libglib2.0-0 libxext6 libsm6 libxrender1 \
- git mercurial subversion \
- gfortran \
- git \
- wget \
- liblapack-dev \
- libopenblas-dev \
- vim
- RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
- /bin/bash ~/miniconda.sh -b -p /opt/conda && \
- rm ~/miniconda.sh && \
- ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
- echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \
- echo "conda activate base" >> ~/.bashrc
- RUN conda install numpy scipy mkl-service mkl ujson pandas matplotlib seaborn scikit-learn
- # Set CUDA_ROOT
- ENV CUDA_ROOT /usr/local/cuda/bin
- # Install CMake 3
- RUN cd /root && wget http://www.cmake.org/files/v3.8/cmake-3.8.1.tar.gz && \
- tar -xf cmake-3.8.1.tar.gz && cd cmake-3.8.1 && \
- ./configure && \
- make -j "$(nproc)" && \
- make install
- # Install Cython
- RUN pip install Cython nose
- # Clone libgpuarray repo and move into it
- RUN cd /root && git clone https://github.com/Theano/libgpuarray.git && cd libgpuarray && \
- # Make and move into build directory
- mkdir Build && cd Build && \
- # CMake
- cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr && \
- # Make
- make -j"$(nproc)" && \
- make install
- # Install pygpu
- RUN cd /root/libgpuarray && \
- python setup.py build_ext -L /usr/lib -I /usr/include && \
- python setup.py install
- # Install bleeding-edge Theano
- RUN pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git
- # Set up .theanorc for CUDA
- #RUN echo "[global]\ndevice=cuda\nfloatX=float32\noptimizer_including=cudnn\n[lib]\ncnmem=0.1\n[nvcc]\nfastmath=True" > /root/.theanorc
- RUN echo "[global]\nfloatX=float32\noptimizer_including=cudnn\n[lib]\ncnmem=0.1\n[nvcc]\nfastmath=True" > /root/.theanorc
- RUN pip install git+https://github.com/pymc-devs/pymc3
- RUN pip install arviz
- RUN echo "export CPLUS_INCLUDE_PATH=/usr/local/cuda/include" >> /root/.bashrc
- RUN conda install jupyter
- RUN wget -q -O - https://deb.nodesource.com/setup_12.x | bash -
- RUN apt-get install -y nodejs
- RUN conda install -c conda-forge jupyterlab
- RUN jupyter labextension install jupyterlab_vim
- RUN conda install pytorch torchvision cudatoolkit=10.0 -c pytorch
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement