Skip to content
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

Fix modal deployment example #157

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,12 @@ app = modal.App(name="golinks")
vol = modal.Volume.from_name("golinks-data", create_if_missing=True)

image = modal.Image.from_registry(
"golang:1.23.0-bookworm",
"golang:1.23.4-bookworm",
add_python="3.10",
).run_commands(["go install -v github.com/tailscale/golink/cmd/golink@latest"])
).run_commands([
"go install -v github.com/tailscale/golink/cmd/golink@latest",
"rm -rf /root/.config"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/root/.config/golinks.db is removed by this command if I understand correctly. I believe this volume was added intentionally.

Copy link
Author

@Miladiir Miladiir Dec 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Runs before volume is mounted. If you don’t do this there is some go telemetry crap in the folder and modal cannot mount the storage volume into the mountpath.

Modal is weird. I really do not like it 🙈

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's just the go telemetry data, I believe there is an env var we can set to turn that off

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the env var is read-only, but we can add go telemetry off as a run command to disable it:
https://go.dev/doc/telemetry#config

])

@app.cls(
image=image,
Expand Down