Repository navigation
Expand file tree
/
Copy pathjustfile
More file actions
72 lines (58 loc) · 2.5 KB
/
Copy pathjustfile
File metadata and controls
72 lines (58 loc) · 2.5 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# justfile for common project commands
# see here for more information: https://github.com/casey/just
# find system default shell
hashbang := if os() == 'macos' {
'/usr/bin/env zsh'
} else {
'/usr/bin/env bash'
}
# cifs / samba command based on operating system
# note for linux / non-mac:
# reads in the username so it may be used with the mount command
# note: cifs-utils is required for this (but may not explicitly be stated by mount command).
# You may install it with, for example: `sudo apt-get install cifs-utils`
cifs_or_samba_mount_command := if os() == 'macos' {
'mount_smbfs //data.ucdenver.pvt/dept/SOM/DBMI/Bandicoot ~/mnt/isilon'
} else {
'read -p "Isilon/CIFS username: " cifs_username && sudo mount -t cifs //data.ucdenver.pvt/dept/SOM/DBMI/Bandicoot ~/mnt/bandicoot -o username=$cifs_username,domainauto'
}
# show a list of just commands for this project
default:
@just --list
# install the project for development purposes
@setup:
#!{{hashbang}}
uv pip install '.'
# mount a uca cifs / samba
@mount-isilon:
#!{{hashbang}}
if mount | grep "/mnt/isilon"; then
echo "The isilon fileshare is already mounted."
else
# create a mount destination
mkdir -p ~/mnt/isilon
# run the mount command
{{cifs_or_samba_mount_command}}
fi
# run isilon demo
@run-isilon-demo:
#!{{hashbang}}
# mount isilon
just mount-isilon
# prepare the data
uv run python src/demo/prepare_files.py
# run the demo for mounted storage, storing the results in a notebook
uv run papermill src/demo/demo_mounted.ipynb src/demo/demo_mounted.ipynb
# run the demo for s3 storage, storing the results in a notebook
uv run papermill src/demo/demo_s3.ipynb src/demo/demo_s3.ipynb
# share a friendly message
echo "Demo completed. The results are stored in src/demo/demo.ipynb."
# benchmark an existing file on a mounted CIFS/SMB share (read-only)
@benchmark-isilon $mount $file:
uv run --no-sync python src/demo/benchmark_mounted.py --mount "$mount" --file "$file"
# benchmark immediate directory enumeration on a mounted CIFS/SMB share (read-only)
@benchmark-isilon-dir $mount $directory:
uv run --no-sync python src/demo/benchmark_mounted.py --mount "$mount" --directory "$directory"
# write at most 1 GiB in a newly created directory; leave benchmark data intact
@benchmark-isilon-write $mount $pattern $size_mib='1024':
uv run --no-sync python src/demo/benchmark_mounted.py --mount "$mount" --write-mib "$size_mib" --write-pattern "$pattern"