updated dockerfiles

This commit is contained in:
Jakob Krause
2018-04-18 17:40:37 +02:00
parent ea9d7718bc
commit 3aacc5fd5d
2 changed files with 6 additions and 5 deletions

7
docker_build.sh Normal file → Executable file
View File

@@ -24,6 +24,7 @@ cat << EOF > $out
FROM ubuntu:16.04 FROM ubuntu:16.04
RUN apt-get update && apt-get install -y zsh \\ RUN apt-get update && apt-get install -y zsh \\
locales \\
vim \\ vim \\
tmux \\ tmux \\
git \\ git \\
@@ -46,8 +47,8 @@ RUN apt-get update && apt-get install -y zsh \\
ENV LC_ALL en_US.UTF-8 ENV LC_ALL en_US.UTF-8
RUN locale-gen en_US.UTF-8 RUN locale-gen en_US.UTF-8
RUN pip install --upgrade pip
RUN pip3 install jupyter scikit-image ipykernel RUN pip3 install jupyter scikit-image ipykernel
RUN pip install jupyter scikit-image ipykernel
RUN ipython3 kernel install RUN ipython3 kernel install
RUN ipython kernel install RUN ipython kernel install
@@ -71,7 +72,7 @@ RUN echo $username:$password | chpasswd && \\
RUN mkdir -p /home/$username && chown -R $username:$username /home/$username RUN mkdir -p /home/$username && chown -R $username:$username /home/$username
USER $username USER $username
WORKDIR /home/$username' WORKDIR /home/$username
RUN echo "PATH=$PATH:/usr/local/bin:~/.local/bin/" > /home/$username/.bashrc RUN echo "PATH=$PATH:/usr/local/bin:~/.local/bin/" > /home/$username/.bashrc
@@ -79,5 +80,5 @@ CMD ["sh", "-c", "jupyter notebook --ip 0.0.0.0"]
EOF EOF
if [ "$1" != "sample" ]; then if [ "$1" != "sample" ]; then
docker build -t 'image_processing_ss16' . docker build -t 'image_processing_ss18' .
fi fi

4
docker_start.sh Normal file → Executable file
View File

@@ -14,8 +14,8 @@ else
-p $PORT:$PORT \ -p $PORT:$PORT \
-v `pwd`:/home/$username/image_processing \ -v `pwd`:/home/$username/image_processing \
-d \ -d \
--name image_processing_ss16_container \ --name image_processing_ss18_container \
image_processing_ss16" image_processing_ss18"
echo "$CMD" echo "$CMD"
$CMD $CMD
fi fi