mirror of
https://github.com/ArthurDanjou/handson-ml3.git
synced 2026-01-14 12:14:36 +01:00
This commit is contained in:
@@ -10,9 +10,11 @@ RUN apt-get update && apt-get upgrade -y \
|
||||
unzip zip \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN conda update -n base conda
|
||||
COPY docker/environment.yml /tmp/
|
||||
RUN conda env create -f /tmp/environment.yml
|
||||
COPY environment.yml /tmp/
|
||||
RUN conda update -y -n base conda \
|
||||
&& conda env create -f /tmp/environment.yml \
|
||||
&& conda clean -y -t \
|
||||
&& rm /tmp/environment.yml
|
||||
|
||||
ARG username
|
||||
ARG userid
|
||||
@@ -30,6 +32,8 @@ RUN chown ${username}:${username} ${workdir}
|
||||
USER ${username}
|
||||
WORKDIR ${workdir}
|
||||
|
||||
ENV PATH /opt/conda/envs/tf2/bin:$PATH
|
||||
|
||||
# The config below enables diffing notebooks with nbdiff (and nbdiff support
|
||||
# in git diff command) after connecting to the container by "make exec" (or
|
||||
# "docker-compose exec handson-ml2 bash")
|
||||
@@ -47,9 +51,9 @@ RUN git config --global diff.jupyternotebook.command 'git-nbdiffdriver diff --ig
|
||||
|
||||
|
||||
COPY docker/bashrc.bash /tmp/
|
||||
RUN cat /tmp/bashrc.bash >> ${home}/.bashrc
|
||||
RUN echo "export PATH=\"${workdir}/docker/bin:$PATH\"" >> ${home}/.bashrc
|
||||
RUN sudo rm /tmp/bashrc.bash
|
||||
RUN cat /tmp/bashrc.bash >> ${home}/.bashrc \
|
||||
&& echo "export PATH=\"${workdir}/docker/bin:$PATH\"" >> ${home}/.bashrc \
|
||||
&& sudo rm /tmp/bashrc.bash
|
||||
|
||||
|
||||
# INFO: Uncomment lines below to enable automatic save of python-only and html-only
|
||||
|
||||
@@ -19,4 +19,4 @@ services:
|
||||
- "6006:6006"
|
||||
volumes:
|
||||
- ../:/home/devel/handson-ml2
|
||||
command: /opt/conda/bin/jupyter notebook --ip='0.0.0.0' --port=8888 --no-browser
|
||||
command: /opt/conda/envs/tf2/bin/jupyter notebook --ip='0.0.0.0' --port=8888 --no-browser
|
||||
|
||||
Reference in New Issue
Block a user