2024-02-19 19:48:10 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
default: up
|
|
|
|
|
|
|
|
|
|
up: run
|
|
|
|
|
|
2024-03-02 17:39:53 -08:00
|
|
|
run: build setup
|
2024-02-19 19:48:10 -08:00
|
|
|
docker compose up
|
|
|
|
|
|
2024-03-02 17:39:53 -08:00
|
|
|
build: jupyter/Dockerfile feast/Dockerfile
|
2024-03-02 08:55:39 -08:00
|
|
|
docker compose build --progress plain
|
2024-02-22 18:54:49 -08:00
|
|
|
|
2024-02-19 19:48:10 -08:00
|
|
|
down:
|
|
|
|
|
docker compose down
|
|
|
|
|
|
2024-03-02 08:55:39 -08:00
|
|
|
# all of this assumes there's a single Nvidia GPU
|
2024-03-02 17:39:53 -08:00
|
|
|
check_numa:
|
|
|
|
|
@lspci | grep -i nvidia | head | awk '{ print $1 }'
|
|
|
|
|
@DEVICE := $(shell lspci | grep -i nvidia | head | awk '{ print $1 }')
|
|
|
|
|
@FILE := /sys/bus/pci/devices/0000:${DEVICE}/numa_node
|
|
|
|
|
@NUMA_STATE := $(shell cat ${FILE})
|
|
|
|
|
@if [[ ${NUMA_STATE} -ne 0 ]]; then \
|
2024-03-02 08:55:39 -08:00
|
|
|
echo "NUMA is not connected to your GPU. Try:"; \
|
|
|
|
|
echo " echo 0 | sudo tee ${FILE}"; \
|
|
|
|
|
exit 1; \
|
|
|
|
|
fi
|
|
|
|
|
|
2024-03-02 17:39:53 -08:00
|
|
|
setup: build feast/repo/feature_store.yaml feast/repo/data
|
2024-03-02 08:55:39 -08:00
|
|
|
|
2024-03-02 17:39:53 -08:00
|
|
|
feast/repo/data:
|
|
|
|
|
docker compose run --rm -t feast bash -c 'cd /repo && feast apply'
|
|
|
|
|
|
|
|
|
|
feast/repo/feature_store.yaml: feast/repo
|
|
|
|
|
docker compose run --rm -t feast feast init repo
|
|
|
|
|
cp feast/feature_store.yaml feast/repo
|
|
|
|
|
|
|
|
|
|
feast/repo:
|
|
|
|
|
mkdir -p feast/repo
|
|
|
|
|
|
|
|
|
|
.PHONY: default up run down build check_numa setup
|
2024-02-19 19:48:10 -08:00
|
|
|
|
|
|
|
|
|