-
Notifications
You must be signed in to change notification settings - Fork 88
/
justfile
55 lines (45 loc) · 1.5 KB
/
justfile
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
s3dir := "./tmp-data"
default:
just --list
build:
rye build
check:
rye run isort . --check-only --diff
rye run black . --check
rye run ruff check s3contents
rye run flake8
fmt:
rye run isort .
rye run ruff format
test FILTER="":
rye run pytest -k "{{FILTER}}"
report:
coverage xml
coverage html
publish:
rye publish
# ------------------------------------------------------------------------------
# Minio
minio:
mkdir -p $PWD/notebooks
docker run -p 9500:9500 -p 9001:9001 -v $PWD:/data -e MINIO_ROOT_USER=access-key -e MINIO_ROOT_PASSWORD=secret-key minio/minio:RELEASE.2021-11-09T03-21-45Z server /data --console-address ":9001"
# From https://docs.min.io/minio/baremetal/installation/deploy-minio-distributed.html?ref=con#deploy-distributed-minio
# Run minio server in distributed mode (necessary for versioning)
minio-distributed:
echo "Once running, manually create a versioned 'notebooks' bucket in Minio-console"
mkdir -p "$PWD/mnt/disk1/notebooks"
mkdir -p "$PWD/mnt/disk2/notebooks"
mkdir -p "$PWD/mnt/disk3/notebooks"
mkdir -p "$PWD/mnt/disk4/notebooks"
docker run -p 9500:9500 -p 9001:9001 \
-v "${s3DIR}/mnt/disk1:/data1" \
-v "${s3DIR}/mnt/disk2:/data2" \
-v "${s3DIR}/mnt/disk3:/data3" \
-v "${s3DIR}/mnt/disk4:/data4" \
-e MINIO_ROOT_USER=access-key -e MINIO_ROOT_PASSWORD=secret-key \
minio/minio:RELEASE.2021-11-09T03-21-45Z server \
"/data1" \
"/data2" \
"/data3" \
"/data4" \
--console-address ":9001"