Created
September 20, 2018 15:17
-
-
Save linnil1/83eee75b987da593a6ba952be2490269 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM nvidia/cuda:9.0-cudnn7-devel-ubuntu16.04 | |
MAINTAINER linnil1 <linnil1.886@gmail.com> | |
ENV LANG en_US.UTF-8 | |
RUN apt update -y && \ | |
apt install -y \ | |
# main thing | |
vim-gtk \ | |
tmux \ | |
tree \ | |
htop \ | |
wget \ | |
curl \ | |
build-essential \ | |
g++ \ | |
git \ | |
cmake \ | |
unzip \ | |
sudo \ | |
openssh-server \ | |
xorg \ | |
openbox \ | |
fonts-noto-cjk \ | |
software-properties-common \ | |
locales \ | |
doxygen | |
RUN locale-gen en_US.UTF-8 && \ | |
useradd -ms /bin/bash ubuntu && \ | |
adduser ubuntu sudo | |
# modify | |
# https://github.com/NVIDIA/nvidia-docker/issues/36 | |
ENV PATH=/usr/local/nvidia/bin/:$PATH | |
RUN chown -R ubuntu:ubuntu /home/ubuntu/ && \ | |
echo "X11UseLocalhost no" >> /etc/ssh/sshd_config && \ | |
echo "X11Forwarding yes" >> /etc/ssh/sshd_config && \ | |
echo "export PATH=$PATH" >> /etc/profile && \ | |
echo "export PATH=$PATH" >> /home/ubuntu/.bashrc | |
## build python | |
RUN apt install -y \ | |
libbz2-dev \ | |
libexpat1-dev \ | |
libffi-dev \ | |
libgdbm-dev \ | |
liblzma-dev \ | |
libncurses5-dev \ | |
libreadline-dev \ | |
libsqlite3-dev \ | |
libssl-dev \ | |
linux-headers-generic \ | |
tcl-dev \ | |
tk \ | |
tk-dev \ | |
zlib1g-dev | |
# ./configure --enable-optimizations | |
RUN wget https://www.python.org/ftp/python/3.6.6/Python-3.6.6.tgz -O /opt/Python-3.6.6.tgz && \ | |
cd /opt && \ | |
tar xf Python-3.6.6.tgz && \ | |
cd Python-3.6.6 && \ | |
./configure && \ | |
make -j8 && \ | |
make install && \ | |
cd / | |
RUN pip3 --no-cache-dir install --upgrade \ | |
numpy==1.14 \ | |
tensorflow-gpu==1.10 \ | |
scipy==1.1.0 \ | |
pandas==0.23.4 \ | |
keras==2.1.6 \ | |
torch==0.4.1 \ | |
torchvision | |
## my | |
RUN pip3 --no-cache-dir install --upgrade \ | |
matplotlib \ | |
ipython \ | |
jupyter \ | |
python-dateutil \ | |
virtualenv \ | |
requests \ | |
opencv-python | |
USER ubuntu | |
ENV HOME /home/ubuntu | |
WORKDIR "/home/ubuntu" | |
USER root | |
EXPOSE 22 | |
COPY Show1.0/start.sh /home/ubuntu/.startup.sh | |
CMD ["bash", "/home/ubuntu/.startup.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service ssh start | |
ldconfig | |
tail -f /var/log/dpkg.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment