-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
101 lines (84 loc) · 3.05 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
include .env
export
setup-env:
conda install -y black
conda install -y pre-commit
pre-commit install
pip install scalene
install-local:
sudo apt-get update && sudo apt-get install libatlas-base-dev liblapack-dev libblas-dev -y
sudo apt-get install -y libgl1-mesa-glx
sudo apt-get install -y libglib2.0-0
python3 -m pip install torch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 --index-url https://download.pytorch.org/whl/cu118
python3 -m pip install -r requirements.txt --no-cache-dir --user
install:
apt-get update && apt-get install libatlas-base-dev liblapack-dev libblas-dev -y
apt-get install -y libgl1-mesa-glx
apt-get install -y libglib2.0-0
python3 -m pip install torch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 --index-url https://download.pytorch.org/whl/cu118
python3 -m pip install -r requirements.txt --no-cache-dir --user
install-arm:
apt-get update && apt-get install libatlas-base-dev liblapack-dev libblas-dev -y
apt-get install -y libgl1-mesa-glx
apt-get install -y libglib2.0-0
python3 -m pip install -r requirements-arm.txt --no-cache-dir --user
install-conda:
sudo apt-get update -y
sudo apt-get install libatlas-base-dev liblapack-dev libblas-dev -y
python3 -m pip install -r requirements.txt --no-cache-dir --user
pre-commit:
poetry run pre-commit run --all-files
build:
DOCKER_BUILDKIT=1 docker build \
--build-arg http_proxy=${HTTP_PROXY} \
--build-arg https_proxy=${HTTPS_PROXY} \
--build-arg no_proxy=${NO_PROXY} \
--build-arg HTTP_PROXY=${HTTP_PROXY} \
--build-arg HTTPS_PROXY=${HTTPS_PROXY} \
--build-arg NO_PROXY=${NO_PROXY} \
--platform linux/amd64 \
-t spatialone-pipeline .
build-amd:
DOCKER_BUILDKIT=1 docker build \
--file Dockerfile_amd \
--build-arg http_proxy=${HTTP_PROXY} \
--build-arg https_proxy=${HTTPS_PROXY} \
--build-arg no_proxy=${NO_PROXY} \
--build-arg HTTP_PROXY=${HTTP_PROXY} \
--build-arg HTTPS_PROXY=${HTTPS_PROXY} \
--build-arg NO_PROXY=${NO_PROXY} \
--platform linux/amd64 \
-t spatialone-pipeline .
build-arm:
DOCKER_BUILDKIT=1 docker build \
--file Dockerfile_arm \
--build-arg http_proxy=${HTTP_PROXY} \
--build-arg https_proxy=${HTTPS_PROXY} \
--build-arg no_proxy=${NO_PROXY} \
--build-arg HTTP_PROXY=${HTTP_PROXY} \
--build-arg HTTPS_PROXY=${HTTPS_PROXY} \
--build-arg NO_PROXY=${NO_PROXY} \
--platform linux/arm64 \
-t spatialone-pipeline .
run:
docker run --gpus device=${GPU_DEVICE_ID} -it -v ${HOST_DATA_PATH}:/app/data -it spatialone-pipeline
run-cpu:
docker run -it -v ${HOST_DATA_PATH}:/app/data -it spatialone-pipeline
test:
PYTHONPATH=${PYTHONPATH}:.:src:tests \
pytest --cov=src/ --cov-fail-under=70 tests/unit_tests
clean:
find ./ -name "*~" | xargs rm -v || :
find ./ -name "*.pyc" | xargs rm -v || :
find ./ -name "__pycache__" | xargs rm -rf || :
run-spatialone:
python3 -m src.pipelines.visium_flow --no-pylint run
docker-build:
# needs HOST_DATA_PATH variable
docker compose build
docker-start:
docker compose up
docker-build-cpu:
docker compose -f docker-compose-cpu.yml build
docker-start-cpu:
docker compose -f docker-compose-cpu.yml up