Skip to content

Instantly share code, notes, and snippets.

View mckees's full-sized avatar

Shane McKee mckees

  • Canonical
  • Grand Junction, CO
  • LinkedIn in/mckeesh
View GitHub Profile
@mckees
mckees / gist:647fe21d04764edbf1b62f50a8496fdc
Last active September 25, 2023 20:42
Tell Packer to use your URL for /etc/apt/sources.list

Give Packer custom URL for sources.list

Packer seems to overwrite /etc/apt/sources.list.

Add the following to packer-maas/ubuntu/user-data-<whatever>:

apt:
  primary:
    - arches: [default]
 uri: 
@mckees
mckees / gist:51f8f000d5f92851d76d17a1e12b1aac
Last active February 12, 2024 20:56
Building an Ubuntu MAAS image with Packer

Packer Usage

Install build deps

sudo apt-get install virt-manager libvirt-daemon ovmf cloud-image-utils libslirp-dev nbdkit nbdfuse fuse2fs ninja-build meson pkg-config libglib2.0-dev libpixman-1-dev flex bison

Install QEMU

Download from https://www.qemu.org/download
cd qemu_dir
./configure --enable-slirp
make -j`nproc` \

@mckees
mckees / gist:4b01ea9bcf09f6224ffda88611bbc666
Created June 15, 2017 21:36
Tensorflow GPU Out of Memory
2017-06-15 11:32:50.740362: W tensorflow/core/common_runtime/bfc_allocator.cc:277] *****************x******************************x*****************************x***x***************xx
2017-06-15 11:32:50.740369: W tensorflow/core/framework/op_kernel.cc:1165] Resource exhausted: OOM when allocating tensor with shape[1152,1024,4,4]
2017-06-15 11:32:50.740655: W tensorflow/core/framework/op_kernel.cc:1165] Resource exhausted: OOM when allocating tensor with shape[1152,1024,4,4]
[[Node: ssd_300_vgg/conv6/convolution = Conv2D[T=DT_FLOAT, data_format="NCHW", padding="VALID", strides=[1, 1, 1, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/gpu:0"](ssd_300_vgg/conv6/convolution/SpaceToBatchND, ssd_300_vgg/conv6/weights/read/_223)]]
INFO:tensorflow:Error reported to Coordinator: <class 'tensorflow.python.framework.errors_impl.ResourceExhaustedError'>, OOM when allocating tensor with shape[1152,1024,4,4]
[[Node: ssd_300_vgg/conv6/convolution = Conv2D[T=DT_FLOAT, data_format="NCHW", padding="VAL