Simon Bruder
9057687d84
All checks were successful
continuous-integration/drone/push Build is passing
52 lines
1.7 KiB
Docker
52 lines
1.7 KiB
Docker
FROM debian:testing as builder
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y \
|
|
apt-file \
|
|
beignet-opencl-icd \
|
|
build-essential \
|
|
cmake \
|
|
git \
|
|
libopencv-dev \
|
|
ocl-icd-opencl-dev \
|
|
opencl-headers
|
|
|
|
RUN git clone --depth=1 https://github.com/DeadSix27/waifu2x-converter-cpp \
|
|
&& cd waifu2x-converter-cpp \
|
|
&& mkdir out \
|
|
&& cd out \
|
|
&& cmake -DENABLE_CUDA=OFF .. \
|
|
&& make -j 4 \
|
|
&& make install \
|
|
&& ldconfig \
|
|
&& cd ../../ \
|
|
&& rm -rf waifu2x-converter-cpp
|
|
|
|
FROM alpine as photo-models
|
|
|
|
RUN mkdir /usr/local/share/waifu2x-converter-cpp-photo \
|
|
&& cd /usr/local/share/waifu2x-converter-cpp-photo \
|
|
&& wget \
|
|
https://raw.githubusercontent.com/nagadomi/waifu2x/master/models/vgg_7/photo/noise0_model.json \
|
|
https://raw.githubusercontent.com/nagadomi/waifu2x/master/models/vgg_7/photo/noise1_model.json \
|
|
https://raw.githubusercontent.com/nagadomi/waifu2x/master/models/vgg_7/photo/noise2_model.json \
|
|
https://raw.githubusercontent.com/nagadomi/waifu2x/master/models/vgg_7/photo/noise3_model.json \
|
|
https://raw.githubusercontent.com/nagadomi/waifu2x/master/models/vgg_7/photo/scale2.0x_model.json
|
|
|
|
FROM debian:testing-slim
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install --no-install-recommends -y \
|
|
beignet-opencl-icd \
|
|
libopencv-core4.1 \
|
|
libopencv-imgcodecs4.1 \
|
|
ocl-icd-libopencl1 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY --from=builder /usr/local /usr/local
|
|
COPY --from=photo-models /usr/local/share/waifu2x-converter-cpp-photo /usr/local/share/waifu2x-converter-cpp-photo
|
|
|
|
RUN ldconfig
|
|
|
|
ENTRYPOINT ["waifu2x-converter-cpp"]
|