host_ssh_port=2222
image_name=simdexcmp
container_name=simdexcmp
data_path=./data

run: build
	docker run --gpus all \
	-it --rm \
	--shm-size 16G \
	--network host \
	-e NVIDIA_VISIBLE_DEVICES=0 \
	-e WANDB_API_KEY \
	--name $(container_name) \
	-v $(shell pwd):/workspace/simdex-comparison \
	-v $(data_path):/data \
	$(image_name) \
	/bin/bash

build:
	docker build --tag $(image_name)  .

push:
	docker push $(image_name) 

pull:
	docker pull $(image_name) 

stop:
	docker stop $(container_name)

ssh: build
	docker run --gpus all \
	-dt --rm \
	--shm-size 16G \
	-p $(host_ssh_port):22 \
	-e NVIDIA_VISIBLE_DEVICES=0 \
	-e WANDB_API_KEY \
	--name $(container_name) \
	-v $(shell pwd):/workspace/simdex-comparison \
	-v $(data_path):/data \
	$(image_name) \
	/usr/sbin/sshd -D
