Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#28] Build Docker image locally when running make run #29

Merged
merged 1 commit into from
Jan 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ ifneq ($(splittrack),)
endif

.PHONY:
.SILENT:
help: ## Display available targets
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)

.PHONY:
run: init ## Run demucs to split the specified track in the input folder
.SILENT:
run: init build ## Run demucs to split the specified track in the input folder
docker run --rm -i \
--name=demucs \
$(docker-gpu-option) \
Expand All @@ -41,7 +43,8 @@ run: init ## Run demucs to split the specified track in the input folder
\"/data/input/$(track)\""

.PHONY:
run-interactive: init ## Run the docker container interactively to experiment with demucs options
.SILENT:
run-interactive: init build ## Run the docker container interactively to experiment with demucs options
docker run --rm -it \
--name=demucs-interactive \
$(docker-gpu-option) \
Expand All @@ -52,5 +55,6 @@ run-interactive: init ## Run the docker container interactively to experiment wi
/bin/bash

.PHONY:
.SILENT:
build: ## Build the docker image which supports running demucs with CPU only or with Nvidia CUDA on a supported GPU
docker build --no-cache -t xserrat/facebook-demucs:latest .