Skip to content

Commit

Permalink
Merge pull request #1 from VForWaTer/rename_json_parameters
Browse files Browse the repository at this point in the history
Rename json parameters
  • Loading branch information
AlexDo1 authored Nov 15, 2022
2 parents d8b31e5 + f132389 commit 2a78b14
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
FROM python:3.10

# install the toolbox runner tools
RUN pip install json2args==0.3.0

RUN pip install json2args==0.4.0

# install pandas and pandas-profiling
RUN pip install pandas==1.5.1 pandas-profiling==3.4.0

# create the tool input structure
RUN mkdir /in
COPY ./in /in
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ Each container needs at least the following structure:
```
/
|- in/
| |- tool.json
| |- parameters.json
|- out/
| |- ...
|- src/
| |- tool.yml
| |- run.py
```

* `tool.json` are parameters. Whichever framework runs the container, this is how parameters are passed.
* `parameters.json` are parameters. Whichever framework runs the container, this is how parameters are passed.
* `tool.yml` is the tool specification. It contains metadata about the scope of the tool, the number of endpoints (functions) and their parameters
* `run.py` is the tool itself, or a Python script that handles the execution. It has to capture all outputs and either `print` them to console or create files in `/out`

Expand All @@ -45,9 +45,9 @@ in the repository secrets in order to run properly.

## How to run?

This template installs the toolbox-runner python package to parse the parameters in the `/in/tool.json`. This assumes that
This template installs the json2args python package to parse the parameters in the `/in/parameters.json`. This assumes that
the files are not renamed and not moved and there is actually only one tool in the container. For any other case, the environment variables
`PARAM_FILE` can be used to specify a new location for the `tool.json` and `TOOL_RUN` can be used to specify the tool to be executed.
`PARAM_FILE` can be used to specify a new location for the `parameters.json` and `TOOL_RUN` can be used to specify the tool to be executed.
The `run.py` has to take care of that.

To invoke the docker container directly run something similar to:
Expand Down
File renamed without changes.

0 comments on commit 2a78b14

Please sign in to comment.