Skip to content

Commit

Permalink
Fixed some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
keisen committed Dec 28, 2019
1 parent c280ab3 commit 2d8ff72
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 31 deletions.
32 changes: 16 additions & 16 deletions docker/Dockerfile-with-cpu
Original file line number Diff line number Diff line change
@@ -1,32 +1,30 @@
FROM ubuntu/latest
FROM ubuntu

# Settings
ENV DEBIAN_FRONTEND noninteractive
ENV PYTHON_VER 3.6.9

# Install essential libraries
RUN apt update
RUN apt upgrade -y
RUN apt install -y --no-install-recommends \
bash-completion curl wget less
bash-completion curl ca-certificates
RUN apt install -y --no-install-recommends \
git build-essential \
libffi-dev libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev
RUN apt clean -y

# Install pyenv
RUN git clone git://github.com/yyuu/pyenv.git /root/.pyenv
RUN git clone https://github.com/yyuu/pyenv-pip-rehash.git /root/.pyenv/plugins/pyenv-pip-rehash
RUN curl -L https://pyenv.run | /bin/bash

ENV PYTHON_VERSION 3.6.10
ENV PYENV_ROOT /root/.pyenv
ENV PATH $PYENV_ROOT/bin:$PATH
RUN echo 'eval "$(pyenv init -)"' >> .bashrc

RUN pyenv install $PYTHON_VER
RUN pyenv global $PYTHON_VER
ENV PATH $PYENV_ROOT/versions/$PYTHON_VER/bin:$PATH

# Install essential python libraries
RUN pip install --no-cache-dir --upgrade pip setuptools
RUN pyenv install -v $PYTHON_VERSION
RUN pyenv global $PYTHON_VERSION
ENV PATH $PYENV_ROOT/versions/$PYTHON_VERSION/bin:$PATH
ENV LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:$PYENV_ROOT/versions/$PYTHON_VERSION/lib

# Setting for jupyter
RUN mkdir /root/.jupyter
Expand All @@ -36,8 +34,10 @@ RUN echo 'c.NotebookApp.ip = "0.0.0.0"' >> /root/.jupyter/jupyter_notebook_confi
RUN echo 'c.NotebookApp.open_browser = False' >> /root/.jupyter/jupyter_notebook_config.py
RUN echo 'c.NotebookApp.token = ""' >> /root/.jupyter/jupyter_notebook_config.py

# Install essential python libraries
RUN pip install --no-cache-dir --upgrade pip setuptools
RUN pip install --no-cache-dir \
numpy scipy imageio tensorflow-cpu>=2.0 \
flake8 isort==4.3.* yapf==0.28.* pytest pytest-pep8 pytest-xdist pytest-cov \
jupyterlab matplotlib pillow

tf-keras-vis==0.1.0 \
tensorflow-cpu>=2.0.* \
numpy scipy imageio pillow \
jupyterlab matplotlib
28 changes: 13 additions & 15 deletions docker/Dockerfile-with-gpu
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ FROM nvidia/cuda:10.0-devel-ubuntu18.04
# Settings
ENV DEBIAN_FRONTEND noninteractive
ENV CUDNN_VERSION 7.6.2.24
ENV PYTHON_VER 3.6.9

LABEL com.nvidia.cudnn.version="${CUDNN_VERSION}"

# Install essential libraries
Expand All @@ -14,26 +12,25 @@ RUN apt install -y --no-install-recommends \
libcudnn7=$CUDNN_VERSION-1+cuda10.0 \
libcudnn7-dev=$CUDNN_VERSION-1+cuda10.0
RUN apt install -y --no-install-recommends \
bash-completion curl wget less
bash-completion curl ca-certificates
RUN apt install -y --no-install-recommends \
git build-essential \
libffi-dev libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev
RUN apt clean -y

# Install pyenv
RUN git clone git://github.com/yyuu/pyenv.git /root/.pyenv
RUN git clone https://github.com/yyuu/pyenv-pip-rehash.git /root/.pyenv/plugins/pyenv-pip-rehash
RUN curl -L https://pyenv.run | /bin/bash

ENV PYTHON_VER 3.6.10
ENV PYENV_ROOT /root/.pyenv
ENV PATH $PYENV_ROOT/bin:$PATH
RUN echo 'eval "$(pyenv init -)"' >> .bashrc

ENV LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:$PYENV_ROOT/versions/$PYTHON_VER/lib
RUN pyenv install $PYTHON_VER
RUN pyenv global $PYTHON_VER
ENV PATH $PYENV_ROOT/versions/$PYTHON_VER/bin:$PATH

# Install essential python libraries
RUN pip install --no-cache-dir --upgrade pip setuptools
ENV LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:$PYENV_ROOT/versions/$PYTHON_VER/lib
ENV LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH

# Setting for jupyter
RUN mkdir /root/.jupyter
Expand All @@ -43,9 +40,10 @@ RUN echo 'c.NotebookApp.ip = "0.0.0.0"' >> /root/.jupyter/jupyter_notebook_confi
RUN echo 'c.NotebookApp.open_browser = False' >> /root/.jupyter/jupyter_notebook_config.py
RUN echo 'c.NotebookApp.token = ""' >> /root/.jupyter/jupyter_notebook_config.py

ENV LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH

# Install essential python libraries
RUN pip install --no-cache-dir --upgrade pip setuptools
RUN pip install --no-cache-dir \
numpy scipy imageio tensorflow-gpu>=2.0 \
flake8 isort==4.3.* yapf==0.28.* pytest pytest-pep8 pytest-xdist pytest-cov \
jupyterlab matplotlib pillow
tf-keras-vis==0.1.0 \
tensorflow-gpu>=2.0.* \
numpy scipy imageio pillow \
jupyterlab matplotlib

0 comments on commit 2d8ff72

Please sign in to comment.