Skip to content

Commit

Permalink
Remove GPU session logic from kubespawner
Browse files Browse the repository at this point in the history
To have all GPU-related logic together in the modify pod hook for
computing resources.
  • Loading branch information
etejedor committed Apr 24, 2024
1 parent 3b77461 commit 7afd154
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions SwanSpawner/swanspawner/swankubespawner.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,19 +89,3 @@ async def stop(self, now=False):
await self.api.delete_namespaced_secret(hadoop_secret_name, namespace)
except ApiException as e:
self.log.error('Error deleting secret {namespace}:{hadoop_secret_name}: {e}')

def get_env(self):
""" Set base environmental variables for swan jupyter docker image """
env = super().get_env()

if self.gpu_requested():
env.update(dict(
# Configure OpenCL to use NVIDIA backend
OCL_ICD_FILENAMES = 'libnvidia-opencl.so.1',
))

return env

def gpu_requested(self):
"""Returns true if the user requested a GPU"""
return "cu" in self.user_options[self.lcg_rel_field]

0 comments on commit 7afd154

Please sign in to comment.