FROM ubuntu:18.04

SHELL ["/bin/bash", "--login", "-c"]

RUN apt-get update

RUN apt-get install -y wget sudo vim git && rm -rf /var/lib/apt/lists/*

RUN adduser --shell /bin/bash --disabled-password --gecos "" python-user
RUN echo "python-user ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/python-user && \
    chmod 0440 /etc/sudoers.d/python-user


USER python-user
WORKDIR /home/python-user

ENV PATH="/home/python-user/miniconda3/bin:${PATH}"
ARG PATH="/home/python-user/miniconda3/bin:${PATH}"

RUN wget \
    https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
    && mkdir /home/python-user/.conda \
    && bash Miniconda3-latest-Linux-x86_64.sh -b -p /home/python-user/miniconda3/\
    && rm -f Miniconda3-latest-Linux-x86_64.sh 
RUN conda --version

RUN conda install -y pip
RUN pip install sphinx nbconvert==6.4.5 nbsphinx nbsphinx_link sphinx-rtd-theme numpy networkx matplotlib ipykernel sphinx_last_updated_by_git typing_extensions
RUN python -m ipykernel install --user
RUN conda install pandoc



ENV PATH="$PATH:/home/python-user/miniconda3/condabin"
RUN conda init bash


# Set user and work directory

ENTRYPOINT [""]
CMD ["sleep", "72000"]

