<commit_before>ifdef FORCE_REBUILD
	DOCKER_FLAGS = --no-cache --pull
endif

# Note: 'make build/tests/benchmarks' share images by retagging the
# candidate as 'google/python'.  So this could cause trouble with
# concurrent builds on the same machine.
CANDIDATE_NAME ?= $(shell date +%Y-%m-%d_%H_%M)
IMAGE_NAME ?= google/python:$(CANDIDATE_NAME)
export IMAGE_NAME

.PHONY: build
build: build-interpreters
	docker build $(DOCKER_FLAGS) -t "$(IMAGE_NAME)" .
	docker tag -f "$(IMAGE_NAME)" "google/python"

.PHONY: build-interpreters
build-interpreters:
	export DOCKER_FLAGS
	make -C python-interpreter-builder build

.PHONY: tests
tests:
	curl https://raw.githubusercontent.com/GoogleCloudPlatform/runtimes-common/master/structure_tests/ext_run.sh > ext_run.sh
	chmod +x ext_run.sh
	make -C tests all

.PHONY: benchmarks
benchmarks:
	make -C tests benchmarks

.PHONY: google-cloud-system-tests
google-cloud-system-tests:
	make -C system_tests

.PHONY: cloudbuild
cloudbuild:
	envsubst <cloudbuild.yaml.in > cloudbuild.yaml
	gcloud alpha container builds create . --config=cloudbuild.yaml<commit_msg>update makefile with local targets<commit_after>ifdef FORCE_REBUILD
	DOCKER_FLAGS = --no-cache --pull
endif

# Note: 'make build/tests/benchmarks' share images by retagging the
# candidate as 'google/python'.  So this could cause trouble with
# concurrent builds on the same machine.
CANDIDATE_NAME ?= $(shell date +%Y-%m-%d_%H_%M)
IMAGE_NAME ?= google/python:$(CANDIDATE_NAME)
export IMAGE_NAME

.PHONY: local-image
local-image: build-interpreters
	docker build $(DOCKER_FLAGS) -t "$(IMAGE_NAME)" .
	docker tag -f "$(IMAGE_NAME)" "google/python"

.PHONY: local-tests
local-tests: local-image
	curl https://raw.githubusercontent.com/GoogleCloudPlatform/runtimes-common/master/structure_tests/ext_run.sh > ext_run.sh
	chmod +x ext_run.sh
	make -C tests all

.PHONY: build-interpreters
build-interpreters:
	export DOCKER_FLAGS
	make -C python-interpreter-builder build

.PHONY: benchmarks
benchmarks:
	make -C tests benchmarks

.PHONY: google-cloud-system-tests
google-cloud-system-tests:
	make -C system_tests

.PHONY: cloudbuild
cloudbuild:
	envsubst <cloudbuild.yaml.in > cloudbuild.yaml
	gcloud alpha container builds create . --config=cloudbuild.yaml
{'fraction_non_alphanumeric': 0.10893730546909737, 'fraction_numerical': 0.0, 'mean_word_length': 4.905511811023622, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '5761547', 'n_tokens_mistral': 795, 'n_tokens_neox': 778, 'n_words': 200}