Skip to content

Commit

Permalink
Drops x11 support from version 0.3 (#127)
Browse files Browse the repository at this point in the history
* Drops x11 support from version 0.3

* Bumps version patch
  • Loading branch information
djperrefort authored Nov 4, 2022
1 parent 6707691 commit 2e01fa5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
17 changes: 0 additions & 17 deletions crc-interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,6 @@ def _validate_arguments(self, args):
if args.invest and not args.partition:
self.error('You must specify a partition when using the Investor cluster')

@staticmethod
def x11_is_available():
"""Return whether x11 is available in the current runtime environment"""

try:
_, x11_err = Shell.run_command('xset q', include_err=True)
return not x11_err

except OSError:
pass

return False

def create_srun_command(self, args):
"""Create an ``srun`` command based on parsed commandline arguments
Expand Down Expand Up @@ -128,10 +115,6 @@ def create_srun_command(self, args):
if (args.gpu or args.invest) and args.num_gpus:
srun_args += ' ' + '--gres=gpu:{}'.format(args.num_gpus)

# Add the --x11 flag only if X11 is working
if self.x11_is_available():
srun_args += ' --x11 '

cluster_to_run = next(cluster for cluster in SlurmInfo.get_cluster_names() if getattr(args, cluster))
return 'srun -M {} {} --pty bash'.format(cluster_to_run, srun_args)

Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.5
0.3.6

0 comments on commit 2e01fa5

Please sign in to comment.