-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.light
95 lines (73 loc) · 2.5 KB
/
Dockerfile.light
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
FROM ubuntu:16.04
ENV DEBIAN_FRONTEND=noninteractive
COPY requirements.txt requirements.txt
RUN APT_INSTALL="apt-get install -y --no-install-recommends" && \
PIP_INSTALL="python -m pip --no-cache-dir install --upgrade" && \
GIT_CLONE="git clone --depth 10" && \
rm -rf /var/lib/apt/lists/* \
/etc/apt/sources.list.d/cuda.list \
/etc/apt/sources.list.d/nvidia-ml.list && \
apt-get update && \
# ==================================================================
# tools
# ------------------------------------------------------------------
$APT_INSTALL \
build-essential \
ca-certificates \
cmake \
wget \
git \
vim \
&& \
# ==================================================================
# python
# ------------------------------------------------------------------
$APT_INSTALL \
software-properties-common \
&& \
add-apt-repository ppa:deadsnakes/ppa && \
apt-get update && \
$APT_INSTALL \
python3.6 \
python3.6-dev \
&& \
wget -O ~/get-pip.py \
https://bootstrap.pypa.io/get-pip.py && \
python3.6 ~/get-pip.py && \
ln -s /usr/bin/python3.6 /usr/local/bin/python3 && \
ln -s /usr/bin/python3.6 /usr/local/bin/python && \
$PIP_INSTALL \
setuptools \
&& \
# ==================================================================
# jupyter
# ------------------------------------------------------------------
$PIP_INSTALL \
jupyter \
jupyterlab \
&& \
# ==================================================================
# pytorch
# ------------------------------------------------------------------
$PIP_INSTALL \
http://download.pytorch.org/whl/cpu/torch-0.4.0-cp36-cp36m-linux_x86_64.whl \
torchvision \
&& \
# ==================================================================
# tensorflow
# ------------------------------------------------------------------
$PIP_INSTALL \
tensorflow \
&& \
# ==================================================================
# config & cleanup
# ------------------------------------------------------------------
ldconfig && \
apt-get clean && \
apt-get autoremove && \
rm -rf /var/lib/apt/lists/* /tmp/* ~/*
# ==================================================================
# Python requirements packages
# ------------------------------------------------------------------
RUN pip install --upgrade -r requirements.txt
EXPOSE 8888 6006