Thanks to Gleb Naumenko (@naumenkogs) via https://blog.bitmex.com/call-to-action-testing-and-improving-asmap/
(fit the commands for your case, probably won't work for everybody)
mkdir ~/asmap-work
git clone https://github.com/sipa/bitcoin -b 202004_asmap_tool && cd bitcoin
./autogen.sh
./configure --disable-shared --without-gui --disable-wallet
make
sudo cp src/bitcoin-asmap /usr/bin/.
cd ~/asmap-work
git clone https://github.com/rrybarczyk/asmap-rs && cd asmap-rs
cargo run --release download && mkdir bottleneck
cargo run --release find-bottleneck -d dump -o bottleneck
(WARNING: cargo run --release download
will download several GBs of data)
bitcoin-asmap encode ~/asmap-work/asmap.dat < bottleneck/bottleneck.*.txt
asmap=/path/to/asmap-work/asmap.dat