forked from FabianoDicheti/dqtensor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuildah.sh
More file actions
22 lines (13 loc) · 651 Bytes
/
buildah.sh
File metadata and controls
22 lines (13 loc) · 651 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
set -e
container=$(buildah from nvidia/cuda:12.2.2-devel-ubuntu20.04)
buildah run $container apt update -y
buildah run $container apt install -y curl git build-essential cmake python3
buildah run $container curl --proto '=https' --tlsv1.2 -sSf http://sh.rustup.rs | sh -s -- -y
buildah run $container bash -c "source $HOME/.cargo/env"
buildah copy $container . /app
buildah config --workingdir /app $container
buildah run $container chmod +x /app/src/build.sh
buildah run $container /app/src/build.sh
buildah config --cmd "/app/target/release/binario_rust" $container
buildah commit $container m_project:latest
echo "Container Image Builded"