-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJustfile
More file actions
55 lines (45 loc) · 1.87 KB
/
Justfile
File metadata and controls
55 lines (45 loc) · 1.87 KB
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
package: build-web copy-files download-deploy-deps
copy-files:
mkdir -p ./dist/Iris
rsync -arvh --exclude-from="./.gitignore" --filter="merge rsync-filter" ./ dist/Iris/ --delete --delete-excluded
compress:
tar -cf - ./dist | xz -z -T0 > archive.tar.xz
build-web:
cd iris-web && npm install && npm run build
download-deploy-deps:
rm -f dist/wheels/*
pip download -r requirements_lock.txt \
--extra-index-url=https://wpilib.jfrog.io/artifactory/api/pypi/wpilib-python-release-2024/simple/ \
--extra-index-url=https://repo.irisvision.dev/simple/ \
--platform=manylinux2014_aarch64 \
--platform=linux_aarch64 \
--only-binary=:all: \
--python-version=3.11 \
-d dist/wheels
install:
pip install pip-tools --no-index --find-links=./wheels/
pip install pip-tools
# First try syncing with the local wheels only
pip-sync --no-index --find-links=./wheels requirements_lock.txt
if [ $? -ne 0 ]; then \
echo "Some packages were missing; retrying with online repositories..."; \
pip-sync requirements_lock.txt \
--extra-index-url=https://repo.irisvision.dev/simple/ \
--find-links=./wheels; \
else \
echo "All packages installed successfully from local wheels."; \
fi
lint:
isort .
black .
cd iris-web && npm run lint
flake8 .
test:
python3 main.py --video assets/2024speaker.webm
update-dependencies:
pip-compile requirements.txt --output-file requirements_lock.txt
deploy remote:
ssh root@{{remote}} "systemctl stop iris"
rsync -arvh --delete --exclude='venv/' dist/* root@{{remote}}:/app/
ssh root@{{remote}} "cd /app/ && source venv/bin/activate && pip install pip-tools --no-index --find-links=./wheels/ && pip-sync --no-index --find-links=./wheels iris/requirements_lock.txt"
ssh root@{{remote}} "systemctl start iris"