Repository navigation
Expand file tree
/
Copy pathcustomize.sh
More file actions
executable file
·48 lines (37 loc) · 1.57 KB
/
Copy pathcustomize.sh
File metadata and controls
executable file
·48 lines (37 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env bash
#
# ===========================================================================
# THIS IS THE FILE YOU EDIT.
#
# Everything else in this repo is boilerplate that makes the image boot
# on SF Compute. Put your packages, config and files here.
#
# Runs as root inside the build VM, on both starting points.
# ===========================================================================
set -euo pipefail
apt-get update
# ---- your packages --------------------------------------------------------
apt-get install -y --no-install-recommends \
htop \
tmux \
;
# ---- your configuration ---------------------------------------------------
# Anything you can do on a running Ubuntu box, you can do here. A few
# examples, commented out:
# Bake in a config file:
# install -D -m 0644 /dev/stdin /etc/myapp/config.toml <<'CONF'
# log_level = "info"
# CONF
# Enable a service so it starts on every boot (start it at boot, not
# here -- the build VM has no GPUs and no network fabric):
# systemctl enable myapp.service
# Install Python deps into a venv your jobs can use. Heavyweight wheels need
# more room than the defaults give you -- torch pulls its own bundled CUDA
# libraries and runs to several GB, so build with a bigger disk:
# packer build -only='qemu.sfc_base' -var 'disk_size=40G' .
# python3 -m venv /opt/venv
# /opt/venv/bin/pip install --no-cache-dir torch
# ---- keep the image small -------------------------------------------------
# Package caches would otherwise be baked into every copy of the image.
apt-get clean
rm -rf /var/lib/apt/lists/*