Minor improvements including consistently setting override to True when loading dotenv
This commit is contained in:
@@ -92,7 +92,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from hello import app, hello"
|
||||
"from hello import app, hello, hello_europe"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -119,6 +119,35 @@
|
||||
"reply"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "a1c075e9-49c7-4ebd-812f-83196d32de32",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Added thanks to student Tue H.\n",
|
||||
"\n",
|
||||
"If you look in hello.py, I've added a simple function hello_europe\n",
|
||||
"\n",
|
||||
"That uses the decorator: \n",
|
||||
"`@app.function(image=image, region=\"eu\")`\n",
|
||||
"\n",
|
||||
"See the result below! More region specific settings are [here](https://modal.com/docs/guide/region-selection)\n",
|
||||
"\n",
|
||||
"Note that it does consume marginally more credits to specify a region."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "b027da1a-c79d-42cb-810d-32ddca31aa02",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"with app.run():\n",
|
||||
" reply=hello_europe.remote()\n",
|
||||
"reply"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "22e8d804-c027-45fb-8fef-06e7bba6295a",
|
||||
@@ -247,8 +276,8 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# You can also run \"modal deploy pricer_service2\" at the command line in an activated environment\n",
|
||||
"!modal deploy pricer_service2"
|
||||
"# You can also run \"modal deploy -m pricer_service2\" at the command line in an activated environment\n",
|
||||
"!modal deploy -m pricer_service2"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -264,6 +293,16 @@
|
||||
"print(reply)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "c29b8c58-4cb7-44b0-ab7e-6469d3a318e8",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"!pip install --upgrade modal"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "9c1b1451-6249-4462-bf2d-5937c059926c",
|
||||
|
||||
Reference in New Issue
Block a user