This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### In terminal 1 ### | |
| $ python | |
| Python 3.6.5 (default, Mar 30 2018, 06:41:53) | |
| [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin | |
| Type "help", "copyright", "credits" or "license" for more information. | |
| >>> from memory_profiler import memory_usage | |
| >>> while True: print(memory_usage(32265, 1, 1)) | |
| ... | |
| [42.6484375] | |
| [42.8046875] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -o pipefail | |
| set -o errexit | |
| unlock_loadpin_and_reboot_if_needed() { | |
| kernel_cmdline="$(cat /proc/cmdline)" | |
| # Assume that kernel commandline will never contain "lsm.module_locking=1", | |
| # which is the default value when unspecified. | |
| if echo "${kernel_cmdline}" | grep -q -v "lsm.module_locking=0"; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #cloud-config | |
| write_files: | |
| - path: /etc/systemd/system/unlock-loadpin.service | |
| permissions: 0755 | |
| owner: root | |
| content: | | |
| [Unit] | |
| Description=Disable loadpin feature | |
| Requires=network-online.target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -o errexit | |
| set -o pipefail | |
| # The script must be run as a root. | |
| NVIDIA_DRIVER_VERSION="${NVIDIA_DRIVER_VERSION:-375.26}" | |
| NVIDIA_DRIVER_DIR="/nvidia-src" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -o nounset | |
| set -o errexit | |
| set -o pipefail | |
| set -x | |
| INSTANCE_NAME=$1 | |
| shift |