Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

Makefile 1.4 KB

You have to be logged in to leave a comment. Sign In
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
35
36
37
  1. #################################################################################
  2. # GLOBALS #
  3. #################################################################################
  4. PROJECT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
  5. PROJECT_NAME = savta_depth
  6. PYTHON_INTERPRETER = python3
  7. ifeq (,$(shell which conda))
  8. HAS_CONDA=False
  9. else
  10. HAS_CONDA=True
  11. endif
  12. #################################################################################
  13. # COMMANDS #
  14. #################################################################################
  15. env:
  16. ifeq (True,$(HAS_CONDA))
  17. @echo ">>> Detected conda, creating conda environment."
  18. conda create -y --name $(PROJECT_NAME) python=3.7.6
  19. @echo ">>> New conda env created. Activate with:\nconda activate $(PROJECT_NAME)"
  20. else
  21. @echo ">>> No conda detected, creating venv environment."
  22. $(PYTHON_INTERPRETER) -m venv env
  23. @echo ">>> New virtual env created. Activate with:\nsource env/bin/activate ."
  24. endif
  25. load_requirements:
  26. @echo ">>> Installing requirements. Make sure your virtual environment is activated."
  27. $(PYTHON_INTERPRETER) -m pip install -U pip setuptools wheel
  28. $(PYTHON_INTERPRETER) -m pip install -r requirements.txt
  29. save_requirements:
  30. @echo ">>> Saving requirements."
  31. pip list --format=freeze > requirements.txt
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...