From e4244cd6d7fbbdf1277dec7ab3acf644378d5771 Mon Sep 17 00:00:00 2001 From: Damien LaRocque Date: Fri, 21 Jun 2024 15:17:04 -0400 Subject: [PATCH] WIP on using Podman for using containers --- Makefile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Makefile b/Makefile index 1a65ba5..bbf14e8 100644 --- a/Makefile +++ b/Makefile @@ -1,21 +1,41 @@ +.PHONY: build podbuild + build: docker build -t borealtc . +podbuild: + buildah build -t borealtc . + run: build docker run --gpus all -e CUDA_VISIBLE_DEVICES=$CUDA_VISIBLE_DEVICES --rm --ipc host \ --mount type=bind,source=.,target=/code/ \ --mount type=bind,source=/dev/shm,target=/dev/shm \ borealtc python3 main.py +podrun: podbuild + podman run --gpus all -e CUDA_VISIBLE_DEVICES=$CUDA_VISIBLE_DEVICES --rm --ipc host \ + --mount type=bind,source=.,target=/code/ \ + --mount type=bind,source=/dev/shm,target=/dev/shm \ + borealtc python3 main.py + build-gpu: docker build -t borealtc-gpu -f DockerfileGPU . +podbuild-gpu: + buildah build -t borealtc-gpu -f DockerfileGPU . + run-gpu: build-gpu docker run --gpus all -e CUDA_VISIBLE_DEVICES=$CUDA_VISIBLE_DEVICES --rm --ipc host \ --mount type=bind,source=.,target=/code/ \ --mount type=bind,source=/dev/shm,target=/dev/shm \ borealtc-gpu python3 main.py +podrun-gpu: podbuild-gpu + podman run --gpus all -e CUDA_VISIBLE_DEVICES=$CUDA_VISIBLE_DEVICES --rm --ipc host \ + --mount type=bind,source=.,target=/code/ \ + --mount type=bind,source=/dev/shm,target=/dev/shm \ + borealtc-gpu python3 main.py + log: xdg-open http://localhost:6006 && tensorboard --logdir tb_logs