Skip to content

Update Dockerfile #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: tensorflow
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 27 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
FROM jupyter/tensorflow-notebook:latest
FROM ubuntu:bionic

RUN apt-get update --fix-missing && apt-get install -y wget software-properties-common && \
add-apt-repository universe && \
apt-get install -y tmux vim htop tmux zsh git zip unzip && \
chsh -s $(which zsh)
USER root

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 software-properties-common curl

RUN wget --quiet https://repo.anaconda.com/archive/Anaconda2-2019.10-Linux-x86_64.sh -O ~/anaconda.sh && \
/bin/bash ~/anaconda.sh -b -p /opt/conda && \
rm ~/anaconda.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 create -n tf python=3.6 tensorflow jupyter

RUN apt-get install -y tmux vim htop tmux zsh git zip unzip

RUN /bin/sh -c "conda update conda && conda init zsh"
RUN /bin/zsh -c "source /root/.zshrc && conda activate tf"
RUN sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
RUN git clone --depth=1 https://github.com/amix/vimrc.git ~/.vim_runtime && \
sh ~/.vim_runtime/install_awesome_vimrc.sh

RUN conda create -n tf python=3.6

EXPOSE 8888

ENTRYPOINT ["/bin/zsh", "-c"]
CMD ["export SHELL=/bin/zsh && conda init zsh && source /root/.zshrc && conda activate tf && jupyter notebook --no-browser --port=8888 --ip=0.0.0.0 --allow-root --config=/root/.jupyter/jupyter_notebook_config.json"]