Skip to content

Commit 92eeb0f

Browse files
committed
add Makefile
1 parent 0a98989 commit 92eeb0f

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

Makefile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
.PHONY: help install html clean serve all
2+
3+
PYTHON := python3
4+
PIP := pip3
5+
OUTPUT_BASE := .
6+
BUILD_DIR := $(OUTPUT_BASE)/_build
7+
8+
help:
9+
@echo "=== 파이토치 한국 사용자 모임 핸즈온 랩 빌드 도구 ==="
10+
@echo "make install - 필요 패키지 설치"
11+
@echo "make html - JupyterBook HTML 빌드"
12+
@echo "make clean - 빌드된 파일 삭제"
13+
@echo "make serve - 로컬 서버 실행 (http://localhost:8000)"
14+
@echo "make all - 전체 과정 실행 (install + html + serve)"
15+
16+
install:
17+
$(PIP) install -r labs/requirements.txt
18+
@echo "✓ 패키지 설치 완료"
19+
20+
html: install
21+
jupyter-book build labs/ --path-output $(OUTPUT_BASE)
22+
@echo "✓ 빌드 완료: $(BUILD_DIR)/html/index.html"
23+
24+
clean:
25+
rm -rf $(BUILD_DIR)
26+
@echo "✓ 빌드 파일이 삭제되었습니다"
27+
28+
serve: html
29+
@echo "Starting server at http://localhost:8000"
30+
@cd $(BUILD_DIR)/html && $(PYTHON) -m http.server 8000
31+
32+
all: clean install html serve

0 commit comments

Comments
 (0)