Skip to content

Commit 633b958

Browse files
cgore1Chinmay Gore
andauthored
Instructions to deploy models in TabPy docker container (#520)
* Instructions to deploy models in tabpy docker container * Correct lint error Co-authored-by: Chinmay Gore <[email protected]>
1 parent 3e5ab6b commit 633b958

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/tabpy-tools.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ on TabPy server.
1818
- [Providing Schema Metadata](#providing-schema-metadata)
1919
- [Querying an Endpoint](#querying-an-endpoint)
2020
- [Evaluating Arbitrary Python Scripts](#evaluating-arbitrary-python-scripts)
21+
- [Deploying Models in TabPy Docker Container](#deploying-models-in-tabpy-docker-container)
2122

2223
<!-- tocstop -->
2324

@@ -433,3 +434,16 @@ using REST `Evaluate`.
433434
The convention for this is to use a provided function call `tabpy.query` in the
434435
code, which behaves like the `query` method in `tabpy-tools`. See the
435436
[REST API documentation](server-rest.md) for an example.
437+
438+
## Deploying Models in TabPy Docker Container
439+
440+
To deploy custom models for TabPy running in docker container, first copy all
441+
python model files onto host machine.
442+
443+
For example, `myFunction.py` is the model we want to deploy.
444+
Run following from the folder containing `myFunction.py` on host machine
445+
446+
```console
447+
docker cp myFunction.py <container_id>:/app/scripts/myFunction.py
448+
docker exec -it <container_id> python /app/scripts/myFunction.py
449+
```

0 commit comments

Comments
 (0)