Skip to content

Commit

Permalink
feat: update docker template
Browse files Browse the repository at this point in the history
Signed-off-by: SUGIYAMA Yoshio <[email protected]>
  • Loading branch information
IMOKURI committed Dec 13, 2024
1 parent 90e9a26 commit ceb7a07
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
10 changes: 5 additions & 5 deletions config/nvim/template/make/base-commands.make
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.DEFAULT_GOAL := help

export
NOW = $(shell date '+%Y%m%d-%H%M%S')

{{_cursor_}}

.PHONY: help
help: ## Show this help
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z0-9_-]+:.*?## / \
{printf "\033[38;2;98;209;150m%-15s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)

export
NOW = $(shell date '+%Y%m%d-%H%M%S')

{{_cursor_}}
11 changes: 6 additions & 5 deletions config/nvim/template/make/snip-docker.make
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@

#######################################################################################################################
# {{_input_:container_name}}
#######################################################################################################################
IMAGE_NAME = {{_input_:container_name}}
IMAGE_TAG = v0.0.1

build-{{_input_:container_name}}: ## Build {{_input_:container_name}}.
docker build -t $(IMAGE_NAME):$(IMAGE_TAG) -f Dockerfile .

up-{{_input_:container_name}}: ## Start {{_input_:container_name}}.
docker run -d --name {{_input_:container_name}} -p 10080:8080 \
--net app-net \
--shm-size=64g \
--gpus '"device=0,1,2,3,4,5,6,7"' \
docker run -d --name {{_input_:container_name}} -p 10000:8000 \
--shm-size=16g \
--gpus '"device=0,1"' \
-v $(XDG_CACHE_HOME):/root/.cache \
$(IMAGE_NAME):$(IMAGE_TAG)

Expand Down

0 comments on commit ceb7a07

Please sign in to comment.