mirror of
https://github.com/olehomelchenko/kse-streamlit-2024-06.git
synced 2025-12-21 21:22:24 +00:00
init
This commit is contained in:
35
Makefile
Normal file
35
Makefile
Normal 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
|
||||
Reference in New Issue
Block a user