This commit is contained in:
Oleh Omelchenko
2024-06-20 00:54:13 +03:00
commit dc660f481c
6 changed files with 58 additions and 0 deletions

35
Makefile Normal file
View File

@@ -0,0 +1,35 @@
# Define the virtual environment directory
VENV_DIR = venv
# Define the requirements file
REQUIREMENTS_FILE = requirements.txt
# Create the virtual environment
$(VENV_DIR):
python3 -m venv $(VENV_DIR)
# Activate the virtual environment and install requirements
.PHONY: install
install: $(VENV_DIR)
$(VENV_DIR)/bin/pip install --upgrade pip
$(VENV_DIR)/bin/pip install -r $(REQUIREMENTS_FILE)
# Clean the virtual environment
.PHONY: clean
clean:
rm -rf $(VENV_DIR)
# Run a command inside the virtual environment
.PHONY: run
run:
$(VENV_DIR)/bin/python -m some_module
# Example of running a script inside the virtual environment
.PHONY: run-script
run-script:
$(VENV_DIR)/bin/python script.py
# Run a Streamlit app inside the virtual environment
.PHONY: run-streamlit
run-streamlit:
$(VENV_DIR)/bin/streamlit run app.py --server.address=127.0.0.1