Skip to content

Commit

Permalink
introduces docker deploy for running pysubyt command-line
Browse files Browse the repository at this point in the history
initial stab at issue #25
  • Loading branch information
marc-portier committed Nov 17, 2021
1 parent 32b2a88 commit 6f0f0af
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM python:3.8-buster

COPY ./ /pysubyt
WORKDIR /pysubyt

RUN python -m pip install --upgrade pip && \
pip install --no-cache-dir -r requirements.txt && \
python setup.py install

ENTRYPOINT ["pysubyt"]

42 changes: 42 additions & 0 deletions docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
TODO: describe how to use the docker thingy


build image

```bash
$ docker build . -t pysubyt
```

test if it runs
```bash
$ docker run pysubyt --help
```

actually run pysubyt in the docker container accessing templates and input from the host

```bash
$ docker run \
-v $(realpath .)/tests/templates:/tpl \
-v $(realpath \.)/tests/in:/in \
pysubyt -t /tpl -i /in/data.csv -n 01-basic.ttl
```



TODO consider a bash function dock-subyt() that takes arguments to execute pysubyt via docker
- then provide that as a sh file that can be sourced
- as well as have a ```make docker``` target to have image build + source that ```docker build -t pysubit && source pysubyt-docker-define.sh```


dock-subyt
** args to manipulate (all optional)
-t «path that should be made absolute and mapped to /tpl»
-i «path that should be made absolute and mapped to /in»/inputname
-o «path that should be made absolute and mapped to /out»/outputname
-s KEY «path that should be made absolute and mapped to /set-${KEY}/inputname
** args to pass through
-n «name to pass through»
-m «modifier to pass through»
-h


0 comments on commit 6f0f0af

Please sign in to comment.