adding feast
This commit is contained in:
parent
d3bd07dcc6
commit
c5afddbfd0
6 changed files with 51 additions and 13 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,3 +1,4 @@
|
||||||
notebooks
|
notebooks
|
||||||
.*.sw*
|
.*.sw*
|
||||||
cuda.deb
|
cuda.deb
|
||||||
|
feast/repo
|
||||||
|
|
|
||||||
30
Makefile
30
Makefile
|
|
@ -4,29 +4,39 @@ default: up
|
||||||
|
|
||||||
up: run
|
up: run
|
||||||
|
|
||||||
run: build
|
run: build setup
|
||||||
docker compose up
|
docker compose up
|
||||||
|
|
||||||
build: jupyter/Dockerfile
|
build: jupyter/Dockerfile feast/Dockerfile
|
||||||
docker compose build --progress plain
|
docker compose build --progress plain
|
||||||
|
|
||||||
down:
|
down:
|
||||||
docker compose down
|
docker compose down
|
||||||
|
|
||||||
# all of this assumes there's a single Nvidia GPU
|
# all of this assumes there's a single Nvidia GPU
|
||||||
precheck:
|
check_numa:
|
||||||
echo hihi
|
@lspci | grep -i nvidia | head | awk '{ print $1 }'
|
||||||
lspci | grep -i nvidia | head | awk '{ print $1 }'
|
@DEVICE := $(shell 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
|
||||||
FILE := /sys/bus/pci/devices/0000:${DEVICE}/numa_node
|
@NUMA_STATE := $(shell cat ${FILE})
|
||||||
NUMA_STATE := $(shell cat ${FILE})
|
@if [[ ${NUMA_STATE} -ne 0 ]]; then \
|
||||||
if [[ ${NUMA_STATE} -ne 0 ]]; then \
|
|
||||||
echo "NUMA is not connected to your GPU. Try:"; \
|
echo "NUMA is not connected to your GPU. Try:"; \
|
||||||
echo " echo 0 | sudo tee ${FILE}"; \
|
echo " echo 0 | sudo tee ${FILE}"; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
setup: build feast/repo/feature_store.yaml feast/repo/data
|
||||||
|
|
||||||
.PHONY: default up run down build precheck
|
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
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,5 +34,13 @@ services:
|
||||||
count: all
|
count: all
|
||||||
capabilities: [gpu]
|
capabilities: [gpu]
|
||||||
|
|
||||||
|
feast:
|
||||||
|
container_name: feast
|
||||||
|
build:
|
||||||
|
context: ./feast
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
ports:
|
||||||
|
- 0.0.0.0:8086:8086
|
||||||
|
volumes:
|
||||||
|
- ./feast/repo:/repo
|
||||||
|
|
||||||
|
|
|
||||||
15
feast/Dockerfile
Normal file
15
feast/Dockerfile
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
FROM ubuntu:23.10
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get -y --no-install-recommends install \
|
||||||
|
python3-pip \
|
||||||
|
&& pip3 install --break-system-packages \
|
||||||
|
feast \
|
||||||
|
&& apt-get -y autoremove \
|
||||||
|
&& apt-get -y clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
WORKDIR /repo
|
||||||
|
|
||||||
|
CMD feast serve -p 8086 -h 0.0.0.0
|
||||||
|
|
||||||
6
feast/feature_store.yaml
Normal file
6
feast/feature_store.yaml
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
project: repo
|
||||||
|
registry: data/registry.db
|
||||||
|
provider: local
|
||||||
|
online_store:
|
||||||
|
type: sqlite
|
||||||
|
path: data/online_store.db
|
||||||
|
|
@ -21,8 +21,6 @@ RUN pip3 install \
|
||||||
keras-tuner \
|
keras-tuner \
|
||||||
&& /bin/true # as above
|
&& /bin/true # as above
|
||||||
|
|
||||||
#RUN find / -name jupyter && echo $PATH && /bin/false
|
|
||||||
|
|
||||||
ENV LD_LIBRARY_PATH /usr/local/cuda-12.0/compat:/usr/local/cuda-12.0/targets/x86_64-linux/lib/:$LD_LIBRARY_PATH
|
ENV LD_LIBRARY_PATH /usr/local/cuda-12.0/compat:/usr/local/cuda-12.0/targets/x86_64-linux/lib/:$LD_LIBRARY_PATH
|
||||||
|
|
||||||
CMD ["/usr/local/bin/jupyter", "lab", "--ip", "0.0.0.0", "--port", "9001", "--no-browser", "--allow-root", "--LabApp.token=''", "--notebook-dir=/notebooks", "--ResourceUseDisplay.track_cpu_percent=True" ]
|
CMD ["/usr/local/bin/jupyter", "lab", "--ip", "0.0.0.0", "--port", "9001", "--no-browser", "--allow-root", "--LabApp.token=''", "--notebook-dir=/notebooks", "--ResourceUseDisplay.track_cpu_percent=True" ]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue