-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
introduces docker deploy for running pysubyt command-line
initial stab at issue #25
- Loading branch information
1 parent
32b2a88
commit 6f0f0af
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
|