-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
48 lines (35 loc) · 1.37 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
FROM nvidia/cuda:8.0-cudnn5-devel-ubuntu16.04
RUN apt update -y && \
apt upgrade -y
RUN apt install -y --no-install-recommends \
python3-dev \
python3-pip \
git && \
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*
RUN update-alternatives --install /usr/local/bin/python python /usr/bin/python3 10 && \
update-alternatives --install /usr/local/bin/pip pip /usr/bin/pip3 10
ENV NB_USER user
ENV NB_UID 1001
RUN useradd -m -s /bin/bash -N -u $NB_UID $NB_USER && \
mkdir -p /src && \
chown $NB_USER /src
USER $NB_USER
RUN pip install --user setuptools wheel && \
pip install --user chainer --pre cupy && \
pip install scikit-learn scipy pandas tqdm autopep8
ENV CHAINER_DATASET_ROOT /src/.dataset
RUN pip install --user nltk && \
python -m nltk.downloader punkt
RUN pip install --user jupyter
ENV PATH /home/user/.local/bin:$PATH
RUN jupyter nbextension enable --py widgetsnbextension && \
jupyter nbextension install https://github.com/kenkoooo/jupyter-autopep8/archive/master.zip --user && \
jupyter nbextension enable jupyter-autopep8-master/jupyter-autopep8
RUN cd /home/$NB_USER && \
git clone --recursive https://github.com/dmlc/xgboost && \
cd xgboost && \
make -j4 && \
cd python-package; python setup.py develop --user
RUN pip install --user hyperopt
WORKDIR /src
CMD jupyter notebook --ip 0.0.0.0 --port 8888