-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile_CPU
51 lines (40 loc) · 1.86 KB
/
Dockerfile_CPU
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 gcr.io/tensorflow/tensorflow:latest
MAINTAINER Alvaro Antelo <[email protected]>
# Pick up some TF dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg \
git \
libcupti-dev \
python \
vim \
wget \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN curl -O https://bootstrap.pypa.io/get-pip.py && \
python get-pip.py && \
rm get-pip.py
RUN pip --no-cache-dir install \
Pillow \
h5py \
numpy \
scipy
RUN pip --no-cache-dir install --upgrade \
https://storage.googleapis.com/tensorflow/linux/cpu/protobuf-3.1.0-cp27-none-linux_x86_64.whl
RUN git clone https://github.com/lengstrom/fast-style-transfer && \
cd fast-style-transfer && \
wget -c https://d17h27t6h515a5.cloudfront.net/topher/2017/January/587d1865_rain-princess/rain-princess.ckpt && \
wget -c https://d17h27t6h515a5.cloudfront.net/topher/2017/January/588aa800_la-muse/la-muse.ckpt && \
wget -c https://d17h27t6h515a5.cloudfront.net/topher/2017/January/588aa846_udnie/udnie.ckpt && \
wget -c https://d17h27t6h515a5.cloudfront.net/topher/2017/January/588aa883_scream/scream.ckpt && \
wget -c https://d17h27t6h515a5.cloudfront.net/topher/2017/January/588aa89d_wave/wave.ckpt && \
wget -c https://d17h27t6h515a5.cloudfront.net/topher/2017/January/588aa8b6_wreck/wreck.ckpt && \
sed -i "s/DEVICE =.*/DEVICE = '\/cpu:0'/" evaluate.py && \
sed -i "s/\/gpu:0/\/cpu:0/" evaluate.py
# For CUDA profiling, TensorFlow requires CUPTI.
ENV LD_LIBRARY_PATH /usr/local/cuda/extras/CUPTI/lib64:$LD_LIBRARY_PATH
# TensorBoard
EXPOSE 6006
WORKDIR "/notebooks/fast-style-transfer"
ENTRYPOINT ["python", "./evaluate.py"]
CMD ["--checkpoint", "./la-muse.ckpt", "--in-path", "/input/", "--out-path", "/output/", "--allow-different-dimensions"]