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

Adds mounts to fly backend #22

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

benbot
Copy link

@benbot benbot commented Dec 20, 2023

I'm working on getting some elastic LLM inference set up using phoenix, fly, and FLAME and needed volumes attached to my flame workers so that I don't need to download an 8gb+ model on startup.

I added support for the mounts field in the machines api (https://fly.io/docs/machines/working-with-machines/)

Though it seems like fly has a bug where this isn't working right now. I keep getting 500s when passing in that argument. I made a thread on their forum to track it
https://community.fly.io/t/machine-api-returning-500-when-passing-in-mounts/17336

@benbot
Copy link
Author

benbot commented Dec 21, 2023

Quick update. Apparently the volumeId is a required field, so i'm going to work on a change to this to grab a volumeId from existing un-attached volumes with matching names, and use those ids to build the mounts array

@benbot
Copy link
Author

benbot commented Dec 21, 2023

Alright, now the fly backend will attempt to find a volumeId that matches the name specified in the mounts config option.

If it finds enough it'll add those ids in as volume in the fly machine request.

This gets around the 500 that's thrown by fly if you don't include the volume id.

Copy link

@mruoss mruoss left a comment

Choose a reason for hiding this comment

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

Stumbled upon this. Some suggestions to improve readability.

lib/flame/fly_backend.ex Outdated Show resolved Hide resolved
lib/flame/fly_backend.ex Outdated Show resolved Hide resolved
lib/flame/fly_backend.ex Outdated Show resolved Hide resolved
@benbot
Copy link
Author

benbot commented Dec 30, 2023

These are great suggestions!

I'll get them in tomorrow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants