Dockerfile to spaces

main
ziembla 2017-12-11 22:02:42 +01:00
parent 60bb0e4e50
commit 9dfaa950d2
2 changed files with 16 additions and 16 deletions

View File

@ -1,16 +1,16 @@
FROM continuumio/anaconda3
RUN apt-get update && apt-get upgrade -y \
&& apt-get install -y \
libpq-dev \
build-essential \
git \
sudo \
&& rm -rf /var/lib/apt/lists/*
&& apt-get install -y \
libpq-dev \
build-essential \
git \
sudo \
&& rm -rf /var/lib/apt/lists/*
RUN conda install -y -c conda-forge \
tensorflow \
jupyter_contrib_nbextensions
tensorflow \
jupyter_contrib_nbextensions
ARG username
ARG userid
@ -19,8 +19,8 @@ ARG home=/home/${username}
ARG workdir=${home}/handson-ml
RUN adduser ${username} --uid ${userid} --gecos '' --disabled-password \
&& echo "${username} ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/${username} \
&& chmod 0440 /etc/sudoers.d/${username}
&& echo "${username} ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/${username} \
&& chmod 0440 /etc/sudoers.d/${username}
WORKDIR ${workdir}
RUN chown ${username}:${username} ${workdir}
@ -57,9 +57,9 @@ COPY docker/nbdime-*.patch /tmp/
USER root
WORKDIR /
RUN patch -d /opt/conda/lib/python3.6/site-packages -p1 --forward --reject-file=- < \
/tmp/nbdime-1-details.patch || true \
&& patch -d /opt/conda/lib/python3.6/site-packages -p1 --forward --reject-file=- < \
/tmp/nbdime-2-toc.patch || true
/tmp/nbdime-1-details.patch || true \
&& patch -d /opt/conda/lib/python3.6/site-packages -p1 --forward --reject-file=- < \
/tmp/nbdime-2-toc.patch || true
RUN rm /tmp/nbdime-*.patch
USER ${username}
WORKDIR ${workdir}
@ -89,5 +89,5 @@ RUN sudo rm /tmp/bashrc.bash
# passwd()
# and take the hash from the output
#RUN mkdir -p ${home}/.jupyter && \
# echo 'c.NotebookApp.password = u"sha1:c6bbcba2d04b:f969e403db876dcfbe26f47affe41909bd53392e"' \
# >> ${home}/.jupyter/jupyter_notebook_config.py
# echo 'c.NotebookApp.password = u"sha1:c6bbcba2d04b:f969e403db876dcfbe26f47affe41909bd53392e"' \
# >> ${home}/.jupyter/jupyter_notebook_config.py

View File

@ -4,7 +4,7 @@ help:
run:
docker-compose up
exec:
docker-compose exec handson-ml /bin/bash
docker-compose exec handson-ml bash
build: stop .FORCE
docker-compose build
rebuild: stop .FORCE