Skip to content

Commit

Permalink
Added Docker support to VCA
Browse files Browse the repository at this point in the history
  • Loading branch information
MyGodItsFull0fStars committed Sep 22, 2023
1 parent f59e9b5 commit 35ed05d
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
build
.vscode
.vscode
docs/build.md

*.mp4
65 changes: 65 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# FROM alpine:3.17.0 AS build

# RUN apk update && \
# apk add --no-cache \
# build-base=0.5-r3 \
# cmake=3.24.3-r0 \
# boost1.80-dev=1.80.0-r3

# WORKDIR /vca

# COPY source/ .source/
# COPY CMakeLists.txt .

# WORKDIR /vca/build

# RUN cmake -DCMAKE_BUILD_TYPE=Release .. && \
# cmake --build . --parallel 8

# FROM alpine:3.17.0

# RUN apk update && \
# apk add --no-cache \
# libstdc++=12.2.1_git20220924-r4 \
# boost1.80-program_options=1.80.0-r3

# RUN addgroup -S vca_user && adduser -S vca_user -G vca_user
# USER vca_user

# COPY --chown=vca_user:vca_user --from=build ./vca/build/src/apps ./app/

# # ENTRYPOINT [ "./app" ]

# syntax=docker/dockerfile:1
# Download base image ubuntu 22.04
FROM --platform=amd64 ubuntu:22.04

# LABEL about the custom image
LABEL maintainer="christian.bauer@aau.at"
LABEL version="0.1"
LABEL description="This is a custom Docker Image for VCA."

# Disable Prompt During Packages Installation
ARG DEBIAN_FRONTEND=noninteractive

# Update Ubuntu Software repository
RUN apt-get update && \
apt-get upgrade -y

RUN apt install -y git nasm ffmpeg cmake build-essential
RUN rm -rf /var/lib/apt/lists/*
RUN apt clean

WORKDIR /vca

COPY source/ source/
COPY CMakeLists.txt .
COPY .clang-format .

RUN mkdir build
# RUN cd build
RUN cmake .
RUN cmake --build .

WORKDIR /vca/source/apps/vca
COPY videos/* .
11 changes: 11 additions & 0 deletions docs/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,14 @@ The following commands will checkout the project source code and create a direct
$ cmake --build .

This will create VCA binaries in the VCA/build/source/apps/ folder.

## Docker Build

VCA can also be used via a Docker container that is build with the `Dockerfile` found in the root directory.

Simply execute the command `docker build --tag vca .` to build the container.

Note that the videos that should be analysed already need to be inside the `videos` directory, since they will be copied into the container.

Afterwards, enter the Docker container in an interactive session via `docker run --rm -it vca`.
The VCA binary and the videos that are to be analysed are found in the directory that is opened with the before mentioned command.
Empty file added videos/.gitkeep
Empty file.

0 comments on commit 35ed05d

Please sign in to comment.