Skip to content

Commit

Permalink
nit: add changes in notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
nikp1172 committed Feb 19, 2024
1 parent f0696a4 commit 3ec1241
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
34 changes: 33 additions & 1 deletion mnist-classifaction/deploy_model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,28 @@
"!mlfoundry login --host <Host name of Truefoundry UI. e.g. https://company.truefoundry.cloud>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Workspace FQN\n",
"Once you run the cell below you will get a prompt to enter your workspace. <br>\n",
"* Step 1: Click on the link given in the prompt.\n",
"* Step 2: Identify the Workspace you want to deploy the application in.\n",
"* Step 3: Copy the Workspace FQN <br>\n",
"![Copying Workspace FQN](https://files.readme.io/730fee2-Screenshot_2023-02-28_at_2.08.34_PM.png)\n",
"* Step 4: Paste the Workspace FQN in the prompt and press enter."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"WORKSPACE_FQN = input(\"Enter the FQN of the workspace to use: \")"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -297,13 +319,23 @@
"!pygmentize deploy_model/deploy.py"
]
},
{
"cell_type": "code",
"execution_count": 55,
"metadata": {},
"outputs": [],
"source": [
"SERVICE_HOST = input(\"Enter the Service Host (Can be found from cluster details in Truefoundry UI)\")\n",
"SERVICE_PATH = input(\"Enter the Service Path where you want your service to be deployed\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!cd deploy_model/ && python deploy.py --workspace_fqn <paste your workspace fqn> --model_version_fqn MODEL_VERSION_FQN --host <Host name of Truefoundry UI. e.g. endpoint.xyz.cloud> --path <path where you want your service to be deployed, like /gradio/app> "
"!cd deploy_model/ && python deploy.py --workspace_fqn $WORKSPACE_FQN --model_version_fqn $MODEL_VERSION_FQN --host $SERVICE_HOST --path $SERVICE_PATH"
]
},
{
Expand Down
1 change: 1 addition & 0 deletions mnist-classifaction/deploy_model/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
image=Build(
build_spec=PythonBuild(
command="python gradio_demo.py",
#commad="uvicorn fastapi_service:app --port 8001 --host 0.0.0.0" for deploying fastapi
requirements_path="requirements.txt",
)
),
Expand Down

0 comments on commit 3ec1241

Please sign in to comment.