Skip to content

Instantly share code, notes, and snippets.

@pourmand1376
Last active November 27, 2022 11:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pourmand1376/8cc4552a0546b4a7268b917204342a36 to your computer and use it in GitHub Desktop.
Save pourmand1376/8cc4552a0546b4a7268b917204342a36 to your computer and use it in GitHub Desktop.
My MakeFile Template
.ONESHELL:
SHELL = /bin/bash
CONDA_ACTIVATE = source $$(conda info --base)/etc/profile.d/conda.sh ; conda activate ; conda activate
.PHONY: help
help: update
@egrep -h '\s##\s' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m %-30s\033[0m %s\n", $$1, $$2}'
update: ## pull git updates
git pull
.PHONY:git
git: update ## pull git updates
.PHONY: install
install: ## install dependencies
$(CONDA_ACTIVATE) yolov5
pip install -r requirements.txt
tensorboard: ## run tensorboard
$(CONDA_ACTIVATE) yolov5
tensorboard --logdir runs/train --port 6006
workers = 1
device = 0
batch = 30
train_description: ## train model
$(CONDA_ACTIVATE) yolov5
git checkout sampler_aneurysm
git pull
python train.py # add parameters
val_description: ## validate model
$(CONDA_ACTIVATE) yolov5
git checkout sampler_aneurysm
git pull
python val.py ## add parameters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment