comixify/dockerfile
Maciej Pęśko b5dd5cffc0
Keyframes (#6)
* Add keyframe model

* Add segmentation utils

* Add keyframes extraction pipeline

* Add keyframe tests

* Update dockerfile to include caffe

* Add summe pretrained model

* Add video for testing

* Update keyframe pipeline, tests

* Update settings to use in memory db for tests

* Set keyframe number to 10, fix bugs

* Fix keyframe order

* Make requested changes

* Fix Dockerfile

* Make requested changes

* Make requested changes

* Add blank lines

* Change dockerfile base cuda image to devel version

* Add modified Cuda.cmake for Dockerfile

* Add pyyaml dependecy to dockerfile

* Update dockerfile

* Update dockerfile

* Fix markdown version error

* Fix markdown version error

* Change caffe installation to make

* Update dockerfile

* Update dockerfile

* Fix boost imoprt

* Fix boost not found bug

* Add feature normalisation

* Fix dateutil, fix caffe root slash

* Fix slash bug

* Add batching to feature extraction

* Add model caching to keyframes extraction

* Fix output images to be in proper range

* Add time logging

* Change feature batch to 128

* Change dockerfile

* Fix dockerfile

* Change feature batch to 10

* Add set mode gpu

* Change feature batch to 64

* Change feature batch to 32

* Add I-frame frame sampling

* Cleanup

* Delete Cuda.cmake

* Remove comments from Makefile.config

* Cleanup

* Fix color scheme switching

* Remove cudnn.hpp, change caffe to 1.0

* Remove cudnn.hpp copy in dockerfile

* Remove redundant run's in dockerfile

* Change pretrained model
2018-10-01 22:27:06 +02:00

53 lines
2.3 KiB
Text

FROM nvidia/cuda:9.0-cudnn7-devel
RUN apt-get update && apt-get install -y apt-utils software-properties-common && \
add-apt-repository ppa:jonathonf/python-3.6 && \
apt-get update && apt-get -y install python3 python3-pip python3.6 python3.6-dev python3.6-venv vim ffmpeg \
build-essential cmake git libgtk2.0-dev pkg-config libavcodec-dev \
wget libatlas-base-dev libboost-all-dev libgflags-dev \
libgoogle-glog-dev libhdf5-serial-dev libleveldb-dev \
liblmdb-dev libopencv-dev libprotobuf-dev \
libsnappy-dev protobuf-compiler \
python-numpy python-setuptools python-scipy \
libavformat-dev libswscale-dev && \
python3.6 -m pip install --upgrade pip && \
python3.6 -m pip install jupyter ipywidgets jupyterlab && \
python3.6 -m pip install tensorflow-gpu h5py keras && \
python3.6 -m pip install scikit-image opencv-contrib-python pyyaml
RUN mkdir /comixify
COPY ./Makefile.config /comixify/Makefile.config
ENV CAFFE_ROOT=/opt/caffe
WORKDIR $CAFFE_ROOT
ENV CLONE_TAG=1.0
RUN git clone -b ${CLONE_TAG} --depth 1 https://github.com/BVLC/caffe.git . && \
cp /comixify/Makefile.config ./Makefile.config && \
cd python && for req in $(cat requirements.txt) pydot; do python3.6 -m pip install $req; done && cd .. && \
sed -i '415s/.*/NVCCFLAGS += -D_FORCE_INLINES -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS)/' Makefile && \
echo "# ---[ Includes" >> CMakeLists.txt && \
echo "set(${CMAKE_CXX_FLAGS} "-D_FORCE_INLINES ${CMAKE_CXX_FLAGS}")" >> CMakeLists.txt && \
ls -la /usr/lib/x86_64-linux-gnu && \
ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py35.so /usr/lib/x86_64-linux-gnu/libboost_python3.so && \
make all -j"$(nproc)" && \
make distribute && \
ENV PYCAFFE_ROOT $CAFFE_ROOT/python
ENV PYTHONPATH $PYCAFFE_ROOT:$PYTHONPATH
ENV PATH $CAFFE_ROOT/build/tools:$PYCAFFE_ROOT:$PATH
RUN echo "$CAFFE_ROOT/build/lib" >> /etc/ld.so.conf.d/caffe.conf && ldconfig && \
python3.6 $CAFFE_ROOT/scripts/download_model_binary.py $CAFFE_ROOT/models/bvlc_googlenet && \
python3.6 -m pip install markdown=="2.6.11" && \
python3.6 -m pip install python-dateutil --upgrade
WORKDIR /comixify
COPY . /comixify
RUN python3.6 -m pip install -r requirements.txt
# Port to expose
EXPOSE 8008
ENTRYPOINT ["sh", "entrypoint.sh"]
CMD ['start']