forked from albarji/neural-style-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
43 lines (33 loc) · 1.12 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
FROM kaixhin/cuda-torch
MAINTAINER "Álvaro Barbero Jiménez, https://github.com/albarji"
# Install system dependencies
RUN set -ex && \
apt-get update && apt-get install --no-install-recommends --no-install-suggests -y \
libprotobuf-dev \
protobuf-compiler \
wget \
&& rm -rf /var/lib/apt/lists/*
# Install loadcaffe and other torch dependencies
RUN luarocks install loadcaffe
# Clone neural-style app
WORKDIR /
RUN set -ex && \
wget --no-check-certificate https://github.com/jcjohnson/neural-style/archive/master.tar.gz && \
tar -xvzf master.tar.gz && \
mv neural-style-master neural-style && \
rm master.tar.gz
# Download precomputed network weights
WORKDIR neural-style
RUN bash models/download_models.sh
RUN mkdir /models
# Declare volume for storing network weights
VOLUME ["/neural-style/models"]
# Copy wrapper scripts
COPY ["/scripts/variants.sh", "/scripts/neural-style.sh", "/neural-style/"]
# Add neural-style to path
ENV PATH /neural-style:$PATH
# Prepare folder for mounting images and workplaces
WORKDIR /images
VOLUME ["/images"]
ENTRYPOINT ["neural-style.sh"]
CMD ["-backend", "cudnn", "-cudnn_autotune"]