Skip to content

Commit

Permalink
WIP on using Podman for using containers
Browse files Browse the repository at this point in the history
  • Loading branch information
IamPhytan committed Jun 21, 2024
1 parent 61e50e5 commit e4244cd
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit e4244cd

Please sign in to comment.