Skip to content

Commit

Permalink
complete minimal doc.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rene Pietzsch committed Sep 27, 2015
1 parent f6686c1 commit 5d642d8
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 7 deletions.
24 changes: 20 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,32 @@
VERSION=$(shell cd FOX; git describe --always --dirty)
THIS_VERSION=$(shell git describe --always --dirty)

XMX=8G
LNG=de
CONTAINER_NAME=fox

default: help

## build a fox docker container
## Build a fox docker container.
build:
docker build -t fox:$(VERSION) .
docker build -t fox:$(THIS_VERSION) .

## Tag the image according to the docker hub naming.
tag:
docker tag fox:testing rpietzsch/fox:$(THIS_VERSION)
docker tag fox:$(THIS_VERSION) fox:latest
docker tag fox:$(THIS_VERSION) rpietzsch/fox:$(THIS_VERSION)
docker tag fox:$(THIS_VERSION) rpietzsch/fox:latest

## Start a container from the image.
run:
docker run -d --name=$(CONTAINER_NAME) -e XMX=$(XMX) -e LNG=$(LNG) -p 4444:4444 fox:$(THIS_VERSION)

## Push built container to public docker registry hub.docker.com .
push:
docker push fox:$(THIS_VERSION)
docker push fox:latest

## This help screen
## This help screen.
help:
printf "Available targets\n\n"
awk '/^[a-zA-Z\-\_0-9]+:/ { \
Expand Down
29 changes: 26 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
# Build and runtime container for FOX

- todo: inclomplete, add test and run/start/stop targets to the Makefile
- see Makefile for build instructions ``make build``
- fox project: http://aksw.org/Projects/FOX.html
- fox githup repo: https://github.com/AKSW/fox
- prebuilt container: https://hub.docker.com/r/rpietzsch/fox-docker/

- http://aksw.org/Projects/FOX.html
## make targets

$ make
Available targets

build Build a fox docker container.
tag Tags the image according to the docker hub naming.
run Starts a container from the image.
push Push built container to public docker registry hub.docker.com .
help This help screen.

## run a fox container

docker run -d --name my_fox_container -p 4444:4444 rpietzsch/fox:latest

To configure fox at runtime use the following environment variables, set them `-e <Variable>=<Value>[-e ...[]]

- `XMX`: configures the jvm memory settings, default `8G`
- `LNG`: sets the language to be trained, currently `en` `de` are supported, default `de`

A sample of a fully run configuration looks like:

docker run -d --name=my_fox_container -e XMX=7G -e LNG=en -p 8888:4444 rpietzsch/fox:latest

0 comments on commit 5d642d8

Please sign in to comment.