Skip to content

Instantly share code, notes, and snippets.

View Markus92's full-sized avatar

Mark Markus92

View GitHub Profile
diff --git a/Lib/_osx_support.py b/Lib/_osx_support.py
index d2aaae7..8bcdb05 100644
--- a/Lib/_osx_support.py
+++ b/Lib/_osx_support.py
@@ -14,13 +14,13 @@ __all__ = [
# configuration variables that may contain universal build flags,
# like "-arch" or "-isdkroot", that may need customization for
# the user environment
-_UNIVERSAL_CONFIG_VARS = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS', 'BASECFLAGS',
- 'BLDSHARED', 'LDSHARED', 'CC', 'CXX',
@Markus92
Markus92 / python-2.7.17+-distutils-C++-fixup.patch
Created February 3, 2026 15:33
Patch for Spack python2 package
This patch fixes a regression intoduced by python-2.7.17+-distutils-C++.patch
and updates the distutils testsuite to pass with 2.7.16:2.7.18:
This how the test suite would have to change when the bug is not fixed:
self.assertEqual(comp.exes['compiler'],
- 'env_cc --sc-cflags --env-cflags --env-cppflags')
+ 'env_cc --env-cflags --env-cppflags')
self.assertEqual(comp.exes['compiler_so'],
- ('env_cc --sc-cflags '
@Markus92
Markus92 / package.py
Created February 3, 2026 15:30
Spack package for python2
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import glob
import json
import os
import platform
import re
@Markus92
Markus92 / serversetup.md
Last active August 26, 2025 10:51
Setting up a GPU server with scheduling and containers

Setting up a GPU server with scheduling and containers

Our group recently acquired a new server to do some deep learning: a SuperMicro 4029GP-TRT2, stuffed with 8x NVidia RTX 2080 Ti. Though maybe a bit overpowered, with upcoming networks like BigGAN and fully 3D networks, as well as students joining our group, this machine will be used quite a lot in the future.

One challenge is, is how to manage these GPUs. There are many approaches, but given that most PhD candidates aren't sysadmins, these range from 'free-for-all', leading to one person hogging all GPUs for weeks due to a bug in the code, to Excel sheets that noone understands and noone adheres to because changing GPU ids in code is hard. This leads to a lot of frustration, low productivity and under-utilisation of these expensive servers. Another issue is conflicting software versions. TensorFlow and Keras, for example, tend to do breaking API changes every now and then. As t