OS _ makefile
dwisianto edited this page Feb 7, 2023
·
6 revisions
- https://stackoverflow.com/questions/23843106/how-to-set-child-process-environment-variable-in-makefile
- https://stackoverflow.com/questions/23843106/how-to-set-child-process-environment-variable-in-makefile
- https://blog.ianpreston.ca/posts/2020-05-13-conda_envs.html
- https://blog.ianpreston.ca/conda/python/bash/2020/05/13/conda_envs.html
- https://stackoverflow.com/questions/53382383/makefile-cant-use-conda-activate
# Oneshell means I can run multiple lines in a recipe in the same shell, so I don't have to
# chain commands together with semicolon
.ONESHELL:
# Need to specify bash in order for conda activate to work.
SHELL=/bin/bash
# Note that the extra activate is needed to ensure that the activate floats env to the front of PATH
CONDA_ACTIVATE=source $$(conda info --base)/etc/profile.d/conda.sh ; conda activate ; conda activate
test:
$(CONDA_ACTIVATE) eg_env
echo $$(which python)
# format the file with black
lint:
$(CONDA_ACTIVATE) eg_env
black eg.py
# Run the file directly
run_py:
$(CONDA_ACTIVATE) eg_env
python eg.py
# Run the file from a shell script
run_sh:
$(CONDA_ACTIVATE) eg_env
bash eg.sh
eg_env.yml
name: eg_env
dependencies:
- numpy
- black
eg.sh
#!/bin/bash
echo "This is my test bash script"
echo "Activating conda environment"
eval "$($(which conda) 'shell.bash' 'hook')"
conda activate eg_env
echo "Running python script"
python eg.py
OS - win - mac - bash - make - Git - Git GitHub - VSCode - vscode - settings - Docker - docker - dk-compose
Ubuntu - tigervnc
- https://gist.github.com/indyfromoz/739cd53d47b91ba1d3b540ab53b1f46c
- https://haydenjames.io/remove-snap-ubuntu-22-04-lts/
AirFlow - airflow_install_anaconda
Geo - geo_course_gds16 - geo_course_gds G_tools pysal G_data geo_data G_format geo_format_shapefile g_db geo_db_spatialite geo_dash geo_plotly_dash
Semantic - s1 - s2 - RDF - OWL - SKOS - FOAF - Protoge - rdflib - owlready - swrl1 - sql1
Graph - g1
TinkerPopOverview = GremlinTraversalLanguage - TinkerGraph - GremlinConsole - GremlinLanguageVariant - GremlinServer - Documentation TinkerPopInstallation =