forked from udacity/CarND-Behavioral-Cloning-P3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
68 lines (56 loc) · 1.56 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
ARG cuda_version=9.0
ARG cudnn_version=7
FROM nvidia/cuda:${cuda_version}-cudnn${cudnn_version}-runtime
MAINTAINER Pyrax
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
# -- Install tools to build python manually and some OpenCV dependencies:
RUN apt update && apt upgrade -y && apt install -y --no-install-recommends \
build-essential \
checkinstall \
libreadline-gplv2-dev \
libncursesw5-dev \
libssl-dev \
libsqlite3-dev \
tk-dev \
libgdbm-dev \
libc6-dev \
libbz2-dev \
zlib1g-dev \
openssl \
libffi-dev \
python3-dev \
python3-setuptools \
curl \
ffmpeg \
libpng-dev \
libsm-dev \
pkg-config \
libgtk2.0-0 \
&& \
rm -rf /var/lib/apt/lists/*
RUN mkdir /tmp/Python36 && \
cd /tmp/Python36
RUN curl --silent https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tar.xz | \
tar xJ -C /tmp/Python36 && \
cd /tmp/Python36/Python-3.6.0 && \
./configure --enable-optimizations && \
make altinstall
RUN curl --silent https://bootstrap.pypa.io/get-pip.py | python3.6
# Backwards compatility.
RUN rm -rf /usr/bin/python3 && \
mv /tmp/Python36/Python-3.6.0/python /usr/bin/python3.6 && \
ln /usr/bin/python3.6 /usr/bin/python3
RUN pip3 install pipenv
# -- Install application:
RUN set -ex && mkdir /src
WORKDIR /src
# Dependencies with pipfiles
COPY Pipfile Pipfile
COPY Pipfile.lock Pipfile.lock
RUN set -ex && pipenv install --deploy --system
# Jupyter
EXPOSE 8888
# Flask server
EXPOSE 4567
CMD pipenv run jupyter notebook --allow-root --port=8888 --ip=0.0.0.0 --NotebookApp.token=