#FROM tensorflow/tensorflow:latest-gpu-py3-jupyter
FROM tensorflow/tensorflow:latest-gpu
#FROM nvidia/cuda:10.2-base

RUN apt-get update && \
    apt-get install -y git vim wget curl

RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
RUN bash ~/miniconda.sh -b -p ./miniconda
ENV PATH="/miniconda/bin:$PATH"

## opencv si weired in docker
#RUN apt-get install -y libsm6 libxext6 libxrender-dev git vim

RUN git clone https://github.com/estorrs/dotfiles.git \
    && cp dotfiles/.vimrc /root/.vimrc \
    && curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

RUN git config --global user.email epstorrs@gmail.com \
    && git config --global user.name Erik Storrs

COPY . /tf/pollock
WORKDIR /tf/pollock

#RUN conda create -n pollock python=3.7
#RUN conda create -n pollock r-base r-essentials
#RUN conda activate pollock

#RUN conda install -n pollock -y r-base r-essentials
#RUN conda install -n pollock -y -c bioconda r-seurat

#RUN conda install -n pollock python=3.6

#RUN /usr/bin/python3 -m pip install .
RUN pip install .

CMD jupyter notebook --no-browser --allow-root --ip 0.0.0.0
