Skip to content

Commit

Permalink
Adds main block admonitions
Browse files Browse the repository at this point in the history
  • Loading branch information
mkandler committed Jun 20, 2024
1 parent 05ee920 commit 9fce913
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 8 deletions.
10 changes: 10 additions & 0 deletions docs/quick-start-cloud.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,16 @@
"(~/.kube/config). If you do not have access to a cluster, you can try the [local version](https://www.run.house/docs/tutorials/quick-start-local) of this tutorial, which sets up and deploys the Python function to a local server, rather than a remote cluster."
]
},
{
"cell_type": "markdown",
"id": "50d19320",
"metadata": {},
"source": [
"<div class=\"note\">\n",
" Make sure that any code in your Python file that's meant to only run locally is placed within a `if __name__ == \"__main__\":` block. Otherwise, the script code will run when Runhouse attempts to import your code remotely. This is not necessary when using a notebook. Please see our [examples directory](https://github.com/run-house/runhouse/tree/main/examples) for implementation details.\n",
"</div>"
]
},
{
"cell_type": "markdown",
"id": "4e40a019-137d-4220-8caa-07b025379133",
Expand Down
10 changes: 10 additions & 0 deletions docs/quick-start-den.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,16 @@
"Let's start by constructing some runhouse resources that we'd like to save down. These resources were first defined in our [Cloud Quick Start Tutorial](https://www.run.house/docs/tutorials/quick-start-cloud). As a reminder, you may need to confirm that your cloud credentials are properly configured by running `sky check`."
]
},
{
"cell_type": "markdown",
"id": "509cc294",
"metadata": {},
"source": [
"<div class=\"note\">\n",
" Make sure that any code in your Python file that's meant to only run locally is placed within a `if __name__ == \"__main__\":` block. Otherwise, the script code will run when Runhouse attempts to import your code remotely. This is not necessary when using a notebook. Please see our [examples directory](https://github.com/run-house/runhouse/tree/main/examples) for implementation details.\n",
"</div>"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down
26 changes: 18 additions & 8 deletions docs/quick-start-local.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "47610c19-d550-46c9-8c7c-038ebd1c8cb2",
"cell_type": "markdown",
"id": "c7c9fa89-036e-4a56-b55b-df4c89b95e9c",
"metadata": {},
"outputs": [],
"source": [
"!pip install runhouse"
"First install Runhouse with `pip install runhouse`"
]
},
{
"cell_type": "markdown",
"id": "c7c9fa89-036e-4a56-b55b-df4c89b95e9c",
"cell_type": "code",
"execution_count": null,
"id": "47610c19-d550-46c9-8c7c-038ebd1c8cb2",
"metadata": {},
"outputs": [],
"source": [
"First install Runhouse with `pip install runhouse`"
"!pip install runhouse"
]
},
{
Expand Down Expand Up @@ -135,6 +135,16 @@
"Standing up your Python code on the server is simple with the Runhouse API. Wrap the function with `rh.function`, and then use `.to(rh.here)` to sync it to the server."
]
},
{
"cell_type": "markdown",
"id": "973aae03",
"metadata": {},
"source": [
"<div class=\"note\">\n",
" Make sure that any code in your Python file that's meant to only run locally is placed within a `if __name__ == \"__main__\":` block. Otherwise, the script code will run when Runhouse attempts to import your code remotely. This is not necessary when using a notebook. Please see our [examples directory](https://github.com/run-house/runhouse/tree/main/examples) for implementation details.\n",
"</div>"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down

0 comments on commit 9fce913

Please sign in to comment.