-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathrun
More file actions
executable file
·34 lines (25 loc) · 907 Bytes
/
run
File metadata and controls
executable file
·34 lines (25 loc) · 907 Bytes
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
#!/usr/bin/env bash
set -e -o pipefail
cd "$(dirname "$0")"
git submodule update --init --recursive
default_cmd="./run_generate"
run_args=(-it --rm
$DOCKER_RUN_ARGS
--entrypoint "" # skip image banners
--gpus=all
--ipc=host --ulimit memlock=-1 --ulimit stack=67108864
# Make docker's user id same as host machine user id
-u $(id -u):$(id -g) -v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro
-v $PWD:$PWD
# Below volume-mount is useful for developing in docker env, but may harm
# reproducibility. Therefore, commented-out by default.
# -v $PWD/.home:$HOME # so that ~/.local and ~/.cache are project-specific
-v /tmp:$HOME/.triton # triton library needs this to be writable for caches
-w $PWD
-e sz -e cfg -e ckpt
vortex
${@:-$default_cmd}
)
mkdir -p .home
docker build -t vortex $DOCKER_BUILD_ARGS .
docker run "${run_args[@]}"