-
Notifications
You must be signed in to change notification settings - Fork 79
/
Dockerfile
53 lines (40 loc) · 1.15 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
FROM nvidia/cuda:10.0-cudnn7-devel-ubuntu18.04
## CLeanup
RUN rm -rf /var/lib/apt/lists/* \
/etc/apt/sources.list.d/cuda.list \
/etc/apt/sources.list.d/nvidia-ml.list
ARG APT_INSTALL="apt-get install -y --no-install-recommends"
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive ${APT_INSTALL} \
python3.7 \
python3.7-dev \
python3-distutils-extra \
git \
wget && \
apt-get clean && \
rm /var/lib/apt/lists/*_*
# Link python to python3
RUN ln -s /usr/bin/python3.7 /usr/local/bin/python3 && \
ln -s /usr/bin/python3.7 /usr/local/bin/python
# Setuptools
RUN wget https://bootstrap.pypa.io/get-pip.py
RUN python get-pip.py
RUN rm get-pip.py
## Locale
# Setup utf8 support for python
RUN apt-get update && \
${APT_INSTALL} locales && \
apt-get clean && \
rm /var/lib/apt/lists/*_*
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV PYTHONIOENCODING=utf-8
EXPOSE 8080
ENV APP_DIR /app
WORKDIR $APP_DIR
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
COPY . $APP_DIR
ENV PYTHONPATH $PYTHONPATH:.:/app/: