Skip to content

Commit

Permalink
Instructions to deploy models in TabPy docker container (tableau#520)
Browse files Browse the repository at this point in the history
* Instructions to deploy models in tabpy docker container

* Correct lint error

Co-authored-by: Chinmay Gore <[email protected]>
  • Loading branch information
cgore1 and Chinmay Gore authored Sep 17, 2021
1 parent 3e5ab6b commit 633b958
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/tabpy-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ on TabPy server.
- [Providing Schema Metadata](#providing-schema-metadata)
- [Querying an Endpoint](#querying-an-endpoint)
- [Evaluating Arbitrary Python Scripts](#evaluating-arbitrary-python-scripts)
- [Deploying Models in TabPy Docker Container](#deploying-models-in-tabpy-docker-container)

<!-- tocstop -->

Expand Down Expand Up @@ -433,3 +434,16 @@ using REST `Evaluate`.
The convention for this is to use a provided function call `tabpy.query` in the
code, which behaves like the `query` method in `tabpy-tools`. See the
[REST API documentation](server-rest.md) for an example.

## Deploying Models in TabPy Docker Container

To deploy custom models for TabPy running in docker container, first copy all
python model files onto host machine.

For example, `myFunction.py` is the model we want to deploy.
Run following from the folder containing `myFunction.py` on host machine

```console
docker cp myFunction.py <container_id>:/app/scripts/myFunction.py
docker exec -it <container_id> python /app/scripts/myFunction.py
```

0 comments on commit 633b958

Please sign in to comment.