Skip to content

Commit

Permalink
slimmed down Docker image, quite drastically, included self.generator
Browse files Browse the repository at this point in the history
  • Loading branch information
jblom committed Nov 6, 2023
1 parent 07dfc9a commit 8e0b173
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ FROM debian:buster-slim
RUN apt-get clean && apt-get update -y && apt-get upgrade -y

# install dependencies - added libssl-dev for installing Python from source later and libgl1-mesa-glx for OpenCV under Python3.10
RUN apt-get install -y git wget vim build-essential cmake pkg-config libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libxvidcore-dev libx264-dev libgtk-3-dev libatlas-base-dev gfortran ffmpeg libssl-dev libgl1-mesa-glx sqlite3 libsqlite3-dev
RUN apt-get install -y git wget vim build-essential cmake pkg-config libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libxvidcore-dev libx264-dev libgtk-3-dev libatlas-base-dev gfortran ffmpeg libssl-dev libgl1-mesa-glx sqlite3 libsqlite3-dev && \
apt-get autoremove --purge && \
apt-get clean

# install opencv_contrib
RUN git clone https://github.com/opencv/opencv_contrib.git && \
Expand All @@ -29,10 +31,13 @@ RUN cd /opencv/build && \
-D ENABLE_FAST_MATH=1 \
-D WITH_LAPACK=OFF .. && \
make -j2 && \
make install && export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib>>~/.bashrc
make install && export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib>>~/.bashrc && \
rm -rf /opencv/build

ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib"

WORKDIR /

# install hecate
RUN git clone https://github.com/yahoo/hecate.git && \
cd hecate && \
Expand Down
7 changes: 7 additions & 0 deletions worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ def __init__(self, config):
self.__queue_name = "VISXP_PREP" # this is the queue that receives the work and NOT the reply queue
self.__binding_key = "#.VISXP_PREP" # ['Video.VISXP_PREP', 'Sound.VISXP_PREP']
self.__depends_on = self.DANE_DEPENDENCIES # TODO make this part of DANE lib?
# NOTE: cannot be automaticcally filled, because no git client is present
self.generator = {
"id": "dane-video-segmentation-worker",
"type": "Software",
"name": "VISXP_PREP",
"homepage": "https://github.com/beeldengeluid/dane-video-segmentation-worker",
}

if not self.UNIT_TESTING:
logger.warning("Need to initialize the VISXP_PREP service")
Expand Down

0 comments on commit 8e0b173

Please sign in to comment.