forked from chrisdonahue/sheetsage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprepare.sh
executable file
·34 lines (30 loc) · 884 Bytes
/
prepare.sh
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
#!/bin/bash
# NOTE: Override this with a local directory of your choosing
SHEETSAGE_CACHE_DIR=$(python3 -c "import pathlib; print(pathlib.Path(pathlib.Path.home(), '.sheetsage').resolve())")
if [ -f "$(pwd)/setup.py" ] && [ -d "$(pwd)/sheetsage" ]; then
DOCKER_LINK_LIB_ARG="-v $(pwd)/sheetsage:/sheetsage/sheetsage"
else
DOCKER_LINK_LIB_ARG=""
fi
while [[ $# -gt 0 ]]; do
case $1 in
-j|--use_jukebox)
JUKEBOX_CMD="&& python -m sheetsage.assets SHEETSAGE_V02_JUKEBOX && python -m sheetsage.assets JUKEBOX "
shift
;;
*)
echo "Unknown option $1"
exit 1
;;
esac
done
mkdir -p $SHEETSAGE_CACHE_DIR
docker run \
-it \
--rm \
-u $(id -u) \
${DOCKER_LINK_LIB_ARG} \
-v $SHEETSAGE_CACHE_DIR:/sheetsage/cache \
chrisdonahue/sheetsage \
/bin/bash -c \
"python -m sheetsage.assets SHEETSAGE_V02_HANDCRAFTED ${JUKEBOX_CMD}"