This commit is contained in:
commit
8c177ee94c
13
.drone.yml
Normal file
13
.drone.yml
Normal file
|
@ -0,0 +1,13 @@
|
|||
kind: pipeline
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: r.sbruder.de
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
repo: r.sbruder.de/waifu2x-converter-cpp
|
47
Dockerfile
Normal file
47
Dockerfile
Normal file
|
@ -0,0 +1,47 @@
|
|||
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
|
||||
|
||||
#COPY freeze.sh /
|
||||
#
|
||||
#RUN apt-file update \
|
||||
# && /freeze.sh waifu2x-converter-cpp
|
||||
|
||||
FROM debian:testing
|
||||
|
||||
#COPY --from=builder /tmp/frozen_packages /tmp/frozen_packages
|
||||
COPY frozen_packages /tmp/frozen_packages
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install --no-install-recommends -y \
|
||||
tini \
|
||||
beignet-opencl-icd \
|
||||
ocl-icd-libopencl1 \
|
||||
&& xargs -a /tmp/frozen_packages apt-get install --no-install-recommends -y \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=builder /usr/local /usr/local
|
||||
|
||||
RUN ldconfig
|
||||
|
||||
ENTRYPOINT ["tini", "--", "waifu2x-converter-cpp"]
|
22
freeze.sh
Executable file
22
freeze.sh
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
function get_libraries() {
|
||||
ldd $(which $1) | cut -d' ' -f1 | tr -d '\t'
|
||||
}
|
||||
|
||||
function get_library_path() {
|
||||
/sbin/ldconfig -p | grep $1 | cut -d'>' -f2 | tr -d ' '
|
||||
}
|
||||
|
||||
function get_library_package() {
|
||||
# does not find many packages despite being installed‽
|
||||
#dpkg -S $1 | cut -d: -f 3 | tr -d ' '
|
||||
# slow, but at least it works
|
||||
apt-file find $1 | head -n 1 | cut -d: -f1
|
||||
}
|
||||
|
||||
echo "Freezing libraries…"
|
||||
|
||||
for library in $(get_libraries $1); do
|
||||
echo "$library "
|
||||
get_library_package $(get_library_path $library) >> /tmp/frozen_packages
|
||||
done
|
99
frozen_packages
Normal file
99
frozen_packages
Normal file
|
@ -0,0 +1,99 @@
|
|||
libaec0
|
||||
libarmadillo9
|
||||
libarpack2
|
||||
libatomic1
|
||||
libc6
|
||||
libcharls2
|
||||
libcom-err2
|
||||
libcurl3-gnutls
|
||||
libdap25
|
||||
libdapclient6v5
|
||||
libdapserver7v5
|
||||
libepsilon1
|
||||
libexpat1
|
||||
libffi6
|
||||
libfontconfig1
|
||||
libfreetype6
|
||||
libfreexl1
|
||||
libfyba0
|
||||
libgcc1
|
||||
libgcrypt20
|
||||
libgdal20
|
||||
libgdcm2.8
|
||||
libgeos-3.7.2
|
||||
libgeos-c1v5
|
||||
libgeotiff2
|
||||
libgfortran5
|
||||
libgif7
|
||||
libgmp10
|
||||
libgnutls30
|
||||
libgpg-error0
|
||||
libgssapi-krb5-2
|
||||
libhdf4-0-alt
|
||||
libhdf5-103
|
||||
libhogweed4
|
||||
libicu63
|
||||
libidn2-0
|
||||
libilmbase23
|
||||
libjbig0
|
||||
libjpeg62-turbo
|
||||
libjson-c3
|
||||
libk5crypto3
|
||||
libkeyutils1
|
||||
libkmlbase1
|
||||
libkmlconvenience1
|
||||
libkmldom1
|
||||
libkmlengine1
|
||||
libkmlregionator1
|
||||
libkmlxsd1
|
||||
libkrb5-3
|
||||
libkrb5support0
|
||||
liblcms2-2
|
||||
libldap-2.4-2
|
||||
libltdl7
|
||||
liblzma5
|
||||
libmariadb3
|
||||
libminizip1
|
||||
libnetcdf13
|
||||
libnettle6
|
||||
libnghttp2-14
|
||||
libnspr4
|
||||
libnss3
|
||||
libodbc1
|
||||
libogdi4.1
|
||||
libopencv-core3.2
|
||||
libopencv-imgcodecs3.2
|
||||
libopencv-imgproc3.2
|
||||
libopenexr23
|
||||
libopenjp2-7
|
||||
libp11-kit0
|
||||
libpcre3
|
||||
libpng16-16
|
||||
libpoppler82
|
||||
libpopt0
|
||||
libpq5
|
||||
libproj13
|
||||
libpsl5
|
||||
libqhull7
|
||||
libquadmath0
|
||||
librtmp1
|
||||
libsasl2-2
|
||||
libspatialite7
|
||||
libsqlite3-0
|
||||
libssh2-1
|
||||
libssl1.1
|
||||
libstdc++6
|
||||
libsuperlu5
|
||||
libsz2
|
||||
libtasn1-6
|
||||
libtbb2
|
||||
libtiff5
|
||||
libunistring2
|
||||
liburiparser1
|
||||
libuuid1
|
||||
libwebp6
|
||||
libxerces-c3.2
|
||||
libxml2
|
||||
libzstd1
|
||||
odbcinst1debian2
|
||||
zlib1g
|
Reference in a new issue