Skip to content

Commit 2ee2a4d

Browse files
committed
podman_compile.sh: add compile helper
1 parent 5febf22 commit 2ee2a4d

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

podman_compile.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#! /bin/bash
2+
3+
4+
set -o pipefail
5+
set -o errexit
6+
set -o nounset
7+
set -o errtrace
8+
9+
opts=""
10+
opts="$opts --device /dev/dri "
11+
echo "Running with the GPU passthrough"
12+
13+
image=localhost/pytorch:remoting
14+
15+
what=${1:-}
16+
if [[ -z "$what" ]]; then
17+
what=remoting
18+
fi
19+
20+
cmd="bash ./build.$what.sh"
21+
22+
set -x
23+
podman run \
24+
--name mac_ai_compiling \
25+
--user root:root \
26+
--cgroupns host \
27+
--security-opt label=disable \
28+
--env HOME="$HOME" \
29+
-v "$HOME":"$HOME":Z \
30+
-w "$PWD" \
31+
-it --rm \
32+
$opts \
33+
$image \
34+
$cmd

0 commit comments

Comments
 (0)