mirror of
https://github.com/containers/ramalama.git
synced 2026-02-05 06:46:39 +01:00
support running all Makefile targets in the bats container
Signed-off-by: Mike Bonnet <mikeb@redhat.com>
This commit is contained in:
18
Makefile
18
Makefile
@@ -167,24 +167,16 @@ bats-image:
|
||||
podman inspect $(BATS_IMAGE) &> /dev/null || \
|
||||
podman build -t $(BATS_IMAGE) -f container-images/bats/Containerfile .
|
||||
|
||||
.PHONY: bats-in-container
|
||||
bats-in-container: bats-image
|
||||
bats-in-container: extra-opts = --security-opt unmask=/proc/* --device /dev/net/tun
|
||||
|
||||
%-in-container: bats-image
|
||||
podman run -it --rm \
|
||||
--userns=keep-id:size=200000 \
|
||||
--security-opt unmask=/proc/* \
|
||||
--security-opt label=disable \
|
||||
--security-opt=mask=/sys/bus/pci/drivers/i915 \
|
||||
--device /dev/net/tun \
|
||||
$(extra-opts) \
|
||||
-v $(CURDIR):/src \
|
||||
$(BATS_IMAGE) make bats
|
||||
|
||||
.PHONY: bats-nocontainer-in-container
|
||||
bats-nocontainer-in-container: bats-image
|
||||
podman run -it --rm \
|
||||
--userns=keep-id:size=200000 \
|
||||
--security-opt=mask=/sys/bus/pci/drivers/i915 \
|
||||
-v $(CURDIR):/src \
|
||||
$(BATS_IMAGE) make bats-nocontainer
|
||||
$(BATS_IMAGE) make $*
|
||||
|
||||
.PHONY: ci
|
||||
ci:
|
||||
|
||||
@@ -8,6 +8,10 @@ ENTRYPOINT ["/usr/bin/entrypoint.sh"]
|
||||
|
||||
RUN dnf -y install make bats jq iproute podman openssl httpd-tools \
|
||||
ollama python3-huggingface-hub \
|
||||
# for validate and unit-tests
|
||||
black codespell shellcheck \
|
||||
python3-flake8 python3-isort python3-pip python3-pytest \
|
||||
perl-Clone perl-FindBin \
|
||||
# for building llama-bench
|
||||
git-core cmake gcc-c++ curl-devel && \
|
||||
dnf -y clean all
|
||||
|
||||
Reference in New Issue
Block a user