-
Notifications
You must be signed in to change notification settings - Fork 16
/
Dockerfile.MLNet
51 lines (39 loc) · 1.18 KB
/
Dockerfile.MLNet
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
FROM nvidia/cuda:8.0-cudnn5-devel
LABEL maintainer="Calden Wloka <[email protected]>"
################################################################################
### Apt and pip dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
wget \
python-dev \
python-setuptools \
python-pkg-resources \
libglib2.0-0 \
libsm-dev \
libxrender-dev \
libxext-dev && \
rm -rf /var/lib/apt/lists/*
RUN cd /tmp && \
wget https://bootstrap.pypa.io/get-pip.py && \
python get-pip.py
RUN pip install \
wheel \
Theano==0.9.0 \
h5py==2.7.1 \
opencv_python==3.3.0.10 \
Keras==1.1.0 \
numpy==1.14.3
RUN mkdir /root/.keras && \
echo '{ \
"image_dim_ordering": "th", \
"backend": "theano" \
}' > /root/.keras/keras.json
RUN echo "[global]\ndevice=gpu\nfloatX=float32\n[nvcc]\nfastmath=True" > /root/.theanorc
COPY ./smiler_tools /tmp/smiler_tools
RUN pip install /tmp/smiler_tools
################################################################################
### Run command on container start.
VOLUME ["/opt/model"]
VOLUME ["/opt/input_vol"]
VOLUME ["/opt/output_vol"]
WORKDIR /opt/model
CMD ["/bin/bash"]