Extnded README (How to add new models)
This commit is contained in:
parent
c0494be28f
commit
a62d481926
11
README.md
11
README.md
@ -115,3 +115,14 @@ Due to the volume mapping specified in the `docker container run` command (see a
|
|||||||
cd /escrito/de.unidue.ltl.escrito && mvn compile -Dmaven.repo.local=/.m2/repository -DskipTests -o -e
|
cd /escrito/de.unidue.ltl.escrito && mvn compile -Dmaven.repo.local=/.m2/repository -DskipTests -o -e
|
||||||
```
|
```
|
||||||
The `-o` flag tells maven to work in 'offline mode', i.e. it forces maven to only rely on resources that are locally available. This makes the re-build quite fast. After the re-build is done, run `classify.sh` again and you should be able to observe that your changes have taken effect.
|
The `-o` flag tells maven to work in 'offline mode', i.e. it forces maven to only rely on resources that are locally available. This makes the re-build quite fast. After the re-build is done, run `classify.sh` again and you should be able to observe that your changes have taken effect.
|
||||||
|
|
||||||
|
## How to add new models
|
||||||
|
escrito Server:
|
||||||
|
- Insert new models into dkpro\models
|
||||||
|
- Add new models to \var\www\nodejs\escrito -> model_names.js
|
||||||
|
- In docker/escrito-docker -> Dockerfile, comment out: # ENTRYPOINT ["/bin/sh", "-c", "while true; do sleep 1; done"] # infinite loop
|
||||||
|
- Rebuild Image: docker image build --no-cache -t escrito:latest .
|
||||||
|
- Rebuild Container: docker container run -td -v ./local:/escrito/de.unidue.ltl.escrito/de.unidue.ltl.escrito.examples/src/main/java/de/unidue/ltl/escrito/examples/local -v ./scripts:/scripts --name escrito-demo escrito:latest
|
||||||
|
- Adjust line 22 in \var\www\nodejs\escrito -> index.js: exec(`docker container exec -t escrito-demo /scripts/classify.sh '${names[res.req.body.name]}' '${res.req.body.text}'`, (error, stdout, stderr) => {
|
||||||
|
- \var\www\nodejs\escrito sudo systemctl stop nodejs-escrito.service
|
||||||
|
- \var\www\nodejs\escrito sudo systemctl start nodejs-escrito.service
|
Loading…
x
Reference in New Issue
Block a user