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

Add mount of pvc #270

Merged
merged 2 commits into from
Feb 23, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 15 additions & 0 deletions kubeflow/core/jupyterhub_spawner.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,18 @@ def extra_resource_limits(self):
# How much disk space do we want?
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to uncomment the line above that sets singleuser_fs_gid
#22 (comment)

Did you test if this works?

Copy link
Author

Choose a reason for hiding this comment

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

yup, just tested more thoroughly:

  1. created notebook in work dir
  2. deleted jupyter pod
  3. recreated pod
  4. notebook was there

Copy link
Author

Choose a reason for hiding this comment

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

AD. singleuser_fs_gid - just checked - we run container as root. That makes it work without gid gimmicks but it's different issue on it's own:)

c.KubeSpawner.user_storage_capacity = '10Gi'
c.KubeSpawner.pvc_name_template = 'claim-{username}{servername}'
c.KubeSpawner.volumes = [
{
'name': 'volume-{username}{servername}',
'persistentVolumeClaim': {
'claimName': 'claim-{username}{servername}'
}
}
]
c.KubeSpawner.volume_mounts = [
{
'mountPath': '/home/jovyan/work',
Copy link
Contributor

Choose a reason for hiding this comment

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

Should everything in /home be on the PVC?

Copy link
Author

Choose a reason for hiding this comment

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

well we have tf examples there too, which I think is a nice touch, and that would disappear.

Copy link
Contributor

Choose a reason for hiding this comment

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

What about about putting it under, /mnt ? I'd like to make it more obvious which directories correspond to PD and which don't.

Copy link
Author

Choose a reason for hiding this comment

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

jupyter tree lands in /home/jovyan, so if we put it in /mnt it won't be obvious how to use it by users.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok. Please address other comments.

'name': 'volume-{username}{servername}'
}
]