-
Notifications
You must be signed in to change notification settings - Fork 47
DOCS-3962: Tweak local module instructions #4330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -778,6 +778,7 @@ On your machine's **CONFIGURE** tab in the [Viam app](https://app.viam.com), cli | |
Select **Local module**, then **Local module**. | ||
|
||
Enter the absolute path to the <file>run.sh</file> script, for example `/home/jessamy/my-module/run.sh` on Linux, or `/Users/jessamy/my-python-sensor-module/run.sh` on macOS. | ||
For modules configured this way, `viam-server` uses this path instead of the `entrypoint` field in your <file>meta.json</file> file. | ||
|
||
Click **Create**. | ||
|
||
|
@@ -788,6 +789,7 @@ On your machine's **CONFIGURE** tab in the [Viam app](https://app.viam.com), cli | |
Select **Local module**, then **Local module**. | ||
|
||
Enter the absolute path to the <file>/bin/<module-name></file> executable, for example `/home/jessamy/my-go-module/bin/mymodule` on Linux, or `/Users/jessamy/my-go-module/bin/mymodule` on macOS. | ||
For modules configured this way, `viam-server` uses this path instead of the `entrypoint` field in your <file>meta.json</file> file. | ||
|
||
Click **Create**. | ||
|
||
|
@@ -828,7 +830,7 @@ For example, if you created a sensor component, check whether readings are displ | |
If your component works, you're almost ready to share your module by uploading it to the registry. | ||
If not, you have some debugging to do. | ||
|
||
Each time you make changes to your local module, you need to rebuild the module and then restart its instance on your machine. | ||
Each time you make changes to your local module code, you need to update its instance on your machine: | ||
|
||
{{< tabs >}} | ||
|
||
|
@@ -843,13 +845,7 @@ viam module reload <insert relevant named args> | |
{{% /tab %}} | ||
{{% tab name="Python: venv" %}} | ||
|
||
Run the following command to rebuild your module: | ||
|
||
```sh {id="terminal-prompt" class="command-line" data-prompt="$"} | ||
viam module build local | ||
``` | ||
|
||
Then restart it in your machine's **CONFIGURE** tab in the Viam app. | ||
Restart the module in your machine's **CONFIGURE** tab in the Viam app. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so for pyinstaller I need to run the CLI command but for venv I need to do it in the UI? What happens if I use the restart option in the UI for pyinstaller and the cli command for venv? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So they're not actually the same--reload rebuilds AND restarts, whereas the UI just restarts. So, reload is unnecessarily time consuming if using run.sh as the entrypoint, because nothing needs to be built. If you use the restart button for pyinstaller, you won't have a newly-built executable--you'll just be restarting the same executable you used previously. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you think I should make this more explicit? Didn't want to over-explain and make it too verbose, but rather just tell them what they need to do. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I think it may just be a bit of a tripwire where people see There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay added something to the venv tab but I think the first tab is okay as-is now that the venv tab addresses why it's different.
JessamyT marked this conversation as resolved.
Show resolved
Hide resolved
|
||
In upper right corner of the module's card, click **...** menu, then click **Restart**. | ||
|
||
{{<imgproc src="/registry/restart-module.png" resize="x600" declaredimensions=true alt="Module menu." style="width:300px" class="shadow" >}} | ||
|
Uh oh!
There was an error while loading. Please reload this page.