<commit_before>all:
	@echo "usage: make containers" >&2
	@echo "       make release-shell" >&2
	@echo "       make release-container" >&2
	@echo "       make release-install" >&2

base-container:
	docker build -t cockpit/infra-base base

containers: release-container verify-container
	@true

release-shell:
	docker run -ti --rm -v /home/cockpit:/home/user:rw \
		--privileged \
		--volume=/home/cockpit/release:/build:rw \
		--volume=$(CURDIR)/release:/usr/local/bin \
		--entrypoint=/bin/bash cockpit/infra-release

release-container:
	docker build -t cockpit/infra-release:staged release
	docker rm -f cockpit-release-stage || true
	docker run --privileged --name=cockpit-release-stage \
		--entrypoint=/usr/local/bin/Dockerfile.sh cockpit/infra-release:staged
	docker commit --change='ENTRYPOINT ["/usr/local/bin/release-runner"]' \
		cockpit-release-stage cockpit/infra-release
	docker rm -f cockpit-release-stage

release-install: release-container
	cp release/cockpit-release.service /etc/systemd/system/
	systemctl daemon-reload
	systemctl enable cockpit-release

verify-shell:
	docker run -ti --rm \
		--privileged \
		--volume /home/cockpit:/home/user \
		--volume $(CURDIR)/verify:/usr/local/bin \
		--volume=/opt/verify:/build:rw \
		--net=host --pid=host --privileged --entrypoint=/bin/bash \
        cockpit/infra-verify -i

verify-container:
	docker build -t cockpit/infra-verify verify

verify-install: verify-container
	cp verify/cockpit-verify.service /etc/systemd/system/
	systemctl daemon-reload
	systemctl enable cockpit-verify<commit_msg>build: Ensure docker daemon is running<commit_after>all:
	@echo "usage: make containers" >&2
	@echo "       make release-shell" >&2
	@echo "       make release-container" >&2
	@echo "       make release-install" >&2

docker-running:
	systemctl start docker

base-container: docker-running
	docker build -t cockpit/infra-base base

containers: release-container verify-container
	@true

release-shell: docker-running
	docker run -ti --rm -v /home/cockpit:/home/user:rw \
		--privileged \
		--volume=/home/cockpit/release:/build:rw \
		--volume=$(CURDIR)/release:/usr/local/bin \
		--entrypoint=/bin/bash cockpit/infra-release

release-container: docker-running
	docker build -t cockpit/infra-release:staged release
	docker rm -f cockpit-release-stage || true
	docker run --privileged --name=cockpit-release-stage \
		--entrypoint=/usr/local/bin/Dockerfile.sh cockpit/infra-release:staged
	docker commit --change='ENTRYPOINT ["/usr/local/bin/release-runner"]' \
		cockpit-release-stage cockpit/infra-release
	docker rm -f cockpit-release-stage

release-install: release-container
	cp release/cockpit-release.service /etc/systemd/system/
	systemctl daemon-reload
	systemctl enable cockpit-release

verify-shell: docker-running
	docker run -ti --rm \
		--privileged \
		--volume /home/cockpit:/home/user \
		--volume $(CURDIR)/verify:/usr/local/bin \
		--volume=/opt/verify:/build:rw \
		--net=host --pid=host --privileged --entrypoint=/bin/bash \
        cockpit/infra-verify -i

verify-container: docker-running
	docker build -t cockpit/infra-verify verify

verify-install: verify-container
	cp verify/cockpit-verify.service /etc/systemd/system/
	systemctl daemon-reload
	systemctl enable cockpit-verify
{'fraction_non_alphanumeric': 0.13554124501686599, 'fraction_numerical': 0.0024532352039251764, 'mean_word_length': 3.5242718446601944, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1927452', 'n_tokens_mistral': 1155, 'n_tokens_neox': 1047, 'n_words': 233}