-
Notifications
You must be signed in to change notification settings - Fork 42
/
Makefile
34 lines (27 loc) · 1.08 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Default environment name and Python version
ENV_NAME ?= oreilly-llama3
PYTHON_VERSION ?= 3.10
repo-setup:
mkdir -p requirements
touch requirements/requirements.in
echo jupyter >> requirements/requirements.in
echo "Requirements folder created with jupyter package"
# Install exact Python and CUDA versions
conda-create:
conda create -n $(ENV_NAME) python=$(PYTHON_VERSION)
echo "Conda environment $(ENV_NAME) created with Python $(PYTHON_VERSION)"
# Bump versions of transitive dependencies
pip-tools-setup:
pip install uv
uv pip install pip-tools setuptools
env-update:
uv pip compile ./requirements/requirements.in -o ./requirements/requirements.txt
uv pip sync ./requirements/requirements.txt
notebook-setup:
python -m ipykernel install --user --name=$(ENV_NAME)
# Repo specific command
repo-specific-command:
echo "Implement"
# Arcane incantation to print all the other targets
help:
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$'