Spaces:
Sleeping
Sleeping
| SHELL := /bin/bash | |
| venv: | |
| python -m venv venv | |
| install: ## Install main dependencies | |
| poetry install --sync | |
| install: ## Install dependencies including dev dependencies such as test and docs | |
| poetry install --sync --with test,docs | |
| ruff: | |
| ruff check . | |
| bandit: | |
| bandit -r . -c pyproject.toml | |
| mypy: | |
| mypy . --config-file pyproject.toml | |
| style: | |
| ruff check . --fix | |
| mypy . --config-file pyproject.toml | |
| bandit -r . -c pyproject.toml | |
| run: | |
| python -m $(demo).app | |
| build: | |
| docker build -t $(CONTAINER_REGISTRY)/$(IMAGE_NAME):$(or $(tag), $(DEFAULT_IMAGE_TAG)) . | |
| push: | |
| docker push $(CONTAINER_REGISTRY)/$(IMAGE_NAME):$(or $(tag), $(DEFAULT_IMAGE_TAG)) | |
| docker-run: | |
| docker run -it --rm -p 7860:7860 \ | |
| $(CONTAINER_REGISTRY)/$(IMAGE_NAME):$(or $(tag), $(DEFAULT_IMAGE_TAG)) \ | |
| python -m $(demo).app | |
| clean: | |
| find . -type f -name "*.DS_Store" -ls -delete | |
| find . | grep -E "(__pycache__|\.pyc|\.pyo)" | xargs rm -rf | |
| find . | grep -E ".pytest_cache" | xargs rm -rf | |
| find . | grep -E ".mypy_cache" | xargs rm -rf | |
| find . | grep -E ".ruff_cache" | xargs rm -rf | |
| find . | grep -E ".ipynb_checkpoints" | xargs rm -rf | |