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