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

update mountPath in kube yaml #592

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ venv/
*.container
*.image
*.volume
**ramalama_**
5 changes: 2 additions & 3 deletions ramalama/kube.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


from ramalama.version import version
from ramalama.common import genname, MNT_DIR, get_env_vars
from ramalama.common import genname, MNT_FILE, get_env_vars


class Kube:
Expand All @@ -25,8 +25,7 @@ def __init__(self, model, args, exec_args):
def gen_volumes(self):
mounts = f"""\
volumeMounts:
- mountPath: {MNT_DIR}
subPath: /models
- mountPath: {MNT_FILE}
name: model"""

volumes = """
Expand Down
4 changes: 2 additions & 2 deletions ramalama/quadlet.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os

from ramalama.common import default_image, MNT_DIR, MNT_FILE, get_env_vars
from ramalama.common import default_image, MNT_FILE, get_env_vars


class Quadlet:
Expand Down Expand Up @@ -92,7 +92,7 @@ def gen_volume(self):
Image={self.name}.image
"""
)
return f"Mount=type=image,source={self.ai_image},destination={MNT_DIR},subpath=/models,readwrite=false"
return f"Mount=type=image,source={self.ai_image},destination={MNT_FILE},readwrite=false"

def gen_image(self):
outfile = self.name + ".image"
Expand Down
Loading