-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnvidia.Dockerfile
54 lines (45 loc) · 1.25 KB
/
nvidia.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
FROM tensorflow/tensorflow:latest-gpu-py3
RUN apt-get update -y && apt-get upgrade -y && \
apt-get install -y --allow-downgrades \
bash \
cron \
python3 \
python3-pip \
sqlite \
libcudnn7=7.2.1.38-1+cuda9.0 \
libnccl2=2.2.13-1+cuda9.0 && \
apt-get clean && \
apt-get autoremove && \
rm -rf /var/lib/apt/lists/* && \
rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin
RUN pip3 install -U \
pip \
setuptools \
circus \
chaussette \
keras==2.1 \
flask \
pytest \
imparaai-checkers \
imparaai-montecarlo
COPY docker/conf/circus.ini /etc/circus/circus.ini
COPY docker/conf/.bashrc /root/.bashrc
COPY docker/start.sh /bin/original_start.sh
COPY docker/crontab /var/cron
RUN ln -snf /bin/bash /bin/sh && \
find /usr/lib/python3 -name __pycache__ | xargs rm -r && \
sed -i -e 's/\r$//' /root/.bashrc && \
tr -d '\r' < /bin/original_start.sh > /bin/start.sh && \
chmod -R 700 /bin/start.sh && \
sed -i -e 's/\r$//' /var/cron && \
chmod 0755 /var/cron && \
/usr/bin/crontab /var/cron
COPY . /var/app
WORKDIR /var/app
EXPOSE 80
ENV TERM xterm-color
ENV TF_CPP_MIN_LOG_LEVEL 2 #disables cpu compile warnings
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV FLASK_APP main.py
CMD ["sh", "/bin/start.sh"]