-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
18 lines (14 loc) · 764 Bytes
/
Makefile
File metadata and controls
18 lines (14 loc) · 764 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
IMAGE_NAME ?= flowsim-image
CONTAINER_NAME ?= flowsim-docker
PORT ?= 22401
MEM_LIMIT ?= 240g
fix-permissions:
sudo chown -R $$(id -u):$$(id -g) $$(pwd)
build-docker:
sudo docker build -t $(IMAGE_NAME) -f dockerfiles/cuda12.6.dockerfile .;
run-docker:
@if [ -n "$(GPU_DEVICES)" ]; then GPU_DEVICES_FLAG="--gpus=$(GPU_DEVICES)"; else GPU_DEVICES_FLAG=""; fi; \
echo "Running: sudo docker run $$GPU_DEVICES_FLAG --network=host --cap-add=SYS_ADMIN -it -p ${PORT}:22 --memory ${MEM_LIMIT} --name $(CONTAINER_NAME) $(IMAGE_NAME)"; \
sudo docker run $$GPU_DEVICES_FLAG --cap-add=SYS_ADMIN --network=host --shm-size 911G -it -p ${PORT}:22 --memory ${MEM_LIMIT} --name $(CONTAINER_NAME) $(IMAGE_NAME)
rm-docker:
sudo docker rm $(CONTAINER_NAME)