Installation¶
See also: Build Tiers · FAQ & Troubleshooting · CLI Overview · Programmer's Guide
1. Download and install milk¶
[!WARNING] This page describes installation of the core package milk. If you install an application package (cacao or coffee), replace "milk" with "cacao" in these instructions.
For download, build commands, and CMake options, see the Quick Start section in README.md.
For configuring minimal or partial builds (engine-only, core without cfitsio, etc.), see Build Tiers.
The sections below cover post-installation setup, dependencies, and optional configuration not covered in the README.
2. Post-installation¶
You may need to add /usr/local/lib to the linker search
path:
$ echo "/usr/local/lib" > usrlocal.conf
$ sudo mv usrlocal.conf /etc/ld.so.conf.d/
$ sudo ldconfig -v
3. tmpfs (optional)¶
Create a tmpfs disk for high-performance shared-memory I/O:
$ echo "tmpfs /milk/shm tmpfs rw,nosuid,nodev" | sudo tee -a /etc/fstab
$ sudo mkdir -p /milk/shm
$ sudo mount /milk/shm
4. Dependencies¶
4.1. Required (full build)¶
| Dependency | Purpose |
|---|---|
| gcc | C compiler (C17) |
| cmake ≥ 3.10 | Build system |
| pkg-config | Locates installed libraries |
| pthreads | POSIX threading (provided by libc) |
Optional dependencies
4.2. Optional¶
| Dependency | CMake option | Default | Purpose |
|---|---|---|---|
| cfitsio | USE_CFITSIO |
ON | FITS file I/O (COREMOD_iofits) |
| readline | USE_READLINE |
ON | Interactive CLI line editing |
| ncurses | USE_NCURSES |
ON | TUI screens (fpsCTRL, procCTRL, streamCTRL) |
| GSL | USE_GSL |
ON | Numerical routines in plugins |
| fftw3 | — | auto | FFT (used by some plugins) |
| openMP | — | auto | Parallel processing |
💡 Tip: For a minimal POSIX-only build, all optional dependencies can be skipped. See Build Tiers for details.
Package installation commands
Ubuntu / Debian:
CentOS / RHEL / Fedora:
cfitsio from source (alternative)
If your distribution does not package cfitsio, install it from source:
- Download from HEASARC
- Build and install:
GPU acceleration (optional)
For GPU-accelerated linear algebra:
- Install NVIDIA driver and CUDA toolkit
- Install MAGMA
If cmake reports "No package 'magma' found", add the MAGMA pkg-config path to your shell profile:
Running multiple versions side by side
⚠️ Warning: Untested — may require tweaking.
Install independent versions by specifying different prefixes:
$ cd ~/src
$ git clone --recursive https://github.com/milk-org/milk milk-1
$ git clone --recursive https://github.com/milk-org/milk milk-2
$ cd ~/src/milk-1/_build
$ cmake -DCMAKE_INSTALL_PREFIX=/usr/local/milk-1 ..
$ sudo make install
$ cd ~/src/milk-2/_build
$ cmake -DCMAKE_INSTALL_PREFIX=/usr/local/milk-2 ..
$ sudo make install
Make version 1 the system default:
Run version 2 explicitly:
Each version can also use its own shared-memory directory: