-
Notifications
You must be signed in to change notification settings - Fork 49
/
Dockerfile.gpu
executable file
·41 lines (32 loc) · 1001 Bytes
/
Dockerfile.gpu
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
FROM tensorflow/tensorflow:1.13.1-gpu-py3
LABEL maintainer="[email protected]"
# add extra PPA for python 3.6
# https://askubuntu.com/questions/865554/how-do-i-install-python-3-6-using-apt-get
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt-get update && apt-get install -y python3.6
RUN pip --no-cache-dir install --upgrade \
pip \
setuptools \
virtualenv
# create python3.6 virtualenv and install tensorflow
RUN virtualenv -p python3.6 ~/.venvs/image-atm
RUN /bin/bash -c "source ~/.venvs/image-atm/bin/activate && pip install \
tensorflow-gpu==1.13.1 \
Keras>=2.2.4 \
keras-vis>=0.4.1 \
awscli \
Click \
h5py \
matplotlib \
Pillow \
python-dateutil \
scikit-learn \
scipy==1.1.* \
tqdm \
yarl"
WORKDIR /root/repo
RUN mkdir /root/repo/imageatm
COPY imageatm /root/repo/imageatm
COPY entrypoints/entrypoint.train.gpu.sh .
RUN echo source ~/.venvs/image-atm/bin/activate >> /etc/bash.bashrc
ENTRYPOINT ["/root/repo/entrypoint.train.gpu.sh"]