Skip to content

Commit

Permalink
Merge pull request #104 from vitrivr/dev
Browse files Browse the repository at this point in the history
Changes in package Structure, VBS 20 & ICME and cottontaildb (Cineast 3)
  • Loading branch information
silvanheller authored Sep 22, 2020
2 parents 17369a5 + db85b9c commit 7949a0f
Show file tree
Hide file tree
Showing 888 changed files with 26,637 additions and 115,034 deletions.
115 changes: 64 additions & 51 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,51 +1,64 @@
*.orig
*.class

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Proto Files
*.bin

# Package Files #
*.jar
*.war
*.ear

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
build
bin
.gradle
.project
.classpath
.settings/

##IntelliJ
.idea
cineast.iml

##Data
/proto/
/representative_frames/
/thumbnails/
/queryImages/

##Framecache
/framecache_*

##Art-UI
/cache/
/mycache/

##Tensorflow
*.tfmodel
/data/
/retrieval_results/
retrieval_results_*
out/
basel-historic-images/
index*

##JSON
/db/**/*.json
# Cineast Caches
cineast_cache*

*.orig
*.class
*.log

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Proto Files
*.bin

# Package Files #
*.jar
*.war
*.ear

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
build
bin
.gradle
.project
.classpath
.settings/

##IntelliJ
.idea
cineast.iml

##Data
/proto/
/representative_frames/
/thumbnails/
/queryImages/

##Framecache
/framecache_*

##Art-UI
/cache/
/mycache/

##Tensorflow
*.tfmodel
/data/
/retrieval_results/
retrieval_results_*
out/
basel-historic-images/
index*

##JSON
/db/**/*.json

/benchmark-default.csv

*.hogcb
*.surfcb
*.pb

##macOS
.DS_Store
14 changes: 9 additions & 5 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
[submodule "adampro-grpc"]
path = adampro-grpc
[submodule "cineast-core/cottontaildb-proto"]
path = cineast-core/cottontaildb-proto
url = https://github.com/vitrivr/cottontaildb-proto.git
[submodule "cineast-core/adampro-grpc"]
path = cineast-core/adampro-grpc
url = https://github.com/vitrivr/ADAMpro-Protobuf.git
[submodule "cottontaildb-proto"]
path = cottontaildb-proto
url = https://github.com/ppanopticon/cottontaildb-proto

[submodule "cineast-api/cineast-proto"]
path = cineast-api/cineast-proto
url = https://github.com/vitrivr/cineast-proto.git
14 changes: 12 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,20 @@ language: java
matrix:
include:
- os: linux
jdk: oraclejdk8
jdk:
- openjdk8
- openjdk11
- os: osx
osx_image: xcode8

before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/

script:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./gradlew check ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./gradlew jar ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./gradlew jar ; fi
43 changes: 43 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
FROM openjdk:14-buster AS build

RUN apt-get update && \
apt-get install -y maven
COPY . /cineast-src
RUN cd /cineast-src && \
./gradlew :cineast-core:generateProto && \
./gradlew getExternalFiles && \
./gradlew fatJar

FROM openjdk:14-slim-buster

RUN mkdir -p /opt/cineast

COPY --from=build \
/cineast-src/cineast.json \
/opt/cineast/cineast.json

COPY --from=build \
/cineast-src/cineast-runtime/build/libs/cineast-runtime-*-full.jar \
/opt/cineast/cineast-cli.jar

COPY --from=build \
/cineast-src/cineast-api/build/libs/cineast-api-*-full.jar \
/opt/cineast/cineast-api.jar

COPY --from=build \
/cineast-src/resources \
/opt/cineast/resources

RUN printf '#!/bin/bash\n\
if [ "$1" != "api" ] && [ "$1" != "cli" ]; then\n\
echo "Usage: $0 api|cli" >&2\n\
exit 1\n\
fi\n\
cd /opt/cineast/ && java -jar cineast-$1.jar ${@:2}'\
> /opt/cineast/bootstrap.sh
RUN chmod +x /opt/cineast/bootstrap.sh

EXPOSE 4567
EXPOSE 4568

ENTRYPOINT ["/opt/cineast/bootstrap.sh"]
56 changes: 43 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,56 @@
[![swagger-editor](https://img.shields.io/badge/open--API-in--editor-green.svg?style=flat&label=open-api-v2)](https://editor.swagger.io/?url=https://raw.githubusercontent.com/vitrivr/cineast/multi-module-openapi-support/docs/swagger.json)
[![Build Status](https://travis-ci.org/vitrivr/cineast.svg?branch=master)](https://travis-ci.org/vitrivr/cineast)

# Cineast
Cineast is a multi-feature content-based mulitmedia retrieval engine. It is capable of retrieving images, audio- and video sequences as well as 3d models based on edge or color sketches, sketch-based motion queries and example objects.
Cineast is written in Java and uses [ADAMpro](https://github.com/vitrivr/ADAMpro) as a storage backend.
Cineast is written in Java and uses [CottontailDB](https://github.com/vitrivr/cottontaildb) as a storage backend.

## Building Cineast
Cineast can be built using [Gradle](http://gradle.org/). Building and running it is as easy as
Cineast can be built using [Gradle](https://gradle.org/). Building and running it is as easy as
```
git clone --recursive https://github.com/vitrivr/cineast.git cineast
cd cineast
./gradlew deploy
cd build/libs
java -jar cineast.jar
$> git clone --recursive https://github.com/vitrivr/cineast.git cineast
$> cd cineast
$> ./gradlew :cineast-core:generateProto
$> ./gradlew cineast-runtime:fatJar
$> java -jar cineast-runtime/build/libs/cineast-runtime-x.x-full.jar cineast.json
```

For more setup information, consult our [Wiki](https://github.com/vitrivr/cineast/wiki)

## Docker image

There is a Docker image available [on Docker
Hub](https://hub.docker.com/repository/docker/vitrivr/cineast).

You can then run the CLI with:
```
$> docker run vitrivr/cineast cli cineast.json help
```

To change the configuration you can use a bind mount, e.g. to run the API
server with custom configuration file cineast.json in the current directory:
```
$> docker run \
--mount type=bind,source="$(pwd)"/cineast.json,target=/opt/cineast/cineast.json \
cineast.json vitrivr/cineast api cineast.json
```

## Generate OpenApi Specification

If you need to rebuild the OpenApi Specification (OAS), there is a gradle task for this purpose:

```
$> ./gradlew -PcineastConfig=<path/to/your/config> generateOpenApiSpecs
```

You can omit `-PcineastConfig`, then the default config (`cineast.json`) is used.
As a result, the OAS is stored at `docs/swagger.json`


## Prerequisites
### System dependencies
* git
* JDK 8 or higher
* Optionally: You should install [Docker](https://docs.docker.com/engine/installation/linux/ubuntulinux/) which you can use for ADAMpro.

### 3D rendering
For 3D rendering (required in order to support 3D models) you either need a video card or Mesa 3D. The JOGL library supports both. Rendering on Headless devices has been successfully tested with Xvfb. The following steps are required to enable
Expand All @@ -30,19 +60,19 @@ For 3D rendering (required in order to support 3D models) you either need a vide
2. Install Xvfb:

```
sudo apt-get install xvfb
$> sudo apt-get install xvfb
```

3. Start a new screen:

```
sudo Xvfb :1 -ac -screen 0 1024x768x24 &
$> sudo Xvfb :1 -ac -screen 0 1024x768x24 &
```

4. Using the new screen, start Cineast:

```
DISPLAY=:1 java -jar cineast.jar -3d
$> DISPLAY=:1 java -jar cineast.jar -3d
```

The -3d option will perform a 3D test. If it succeeds, cineast should generate a PNG image depicting two coloured
Expand All @@ -59,8 +89,8 @@ Cineast uses [semantic versioning](https://semver.org). See [the releases page](
### Code Style

Cineast primarily uses the [Google Java Styleguide](https://google.github.io/styleguide/javaguide.html).
Please keep the changes you do in compliance with it.
Please use the file supplied in the `docs/` folder

To automatically apply the styleguide in [IntelliJ IDEA](https://www.jetbrains.com/idea/) import the [styleguide](https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml) in _File_ -> _Settings_ -> _Editor_ -> _Code Style_ -> _Java_ and import the [scheme](https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml) via the gear icon.
To automatically apply the styleguide in [IntelliJ IDEA](https://www.jetbrains.com/idea/) go to_File_ -> _Settings_ -> _Editor_ -> _Code Style_ -> _Java_ and import the supplied file via the gear icon.

You can also use [Eclipse](https://www.eclipse.org/) for development and use Google's [styleguide for eclipse](https://github.com/google/styleguide/blob/gh-pages/eclipse-java-google-style.xml).
Loading

0 comments on commit 7949a0f

Please sign in to comment.