diff --git a/.github/workflows/check-large-files.yml b/.github/workflows/check-large-files.yml new file mode 100644 index 0000000..392937e --- /dev/null +++ b/.github/workflows/check-large-files.yml @@ -0,0 +1,28 @@ +# Same 1MB check as .pre-commit-config.yaml +name: Check large files + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +jobs: + check-large-files: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install pre-commit + run: pip install pre-commit + + - name: Run pre-commit (check-added-large-files) + run: pre-commit run check-added-large-files --all-files diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..099dfb3 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,7 @@ +# See https://pre-commit.com for more information +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: check-added-large-files + args: ["--maxkb=1024"] diff --git a/README.md b/README.md index c0a0828..6b4a252 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ HyperAccel의 기술 블로그입니다. Hugo와 PaperMod 테마를 사용하여 - [다국어 지원 (Multilingual)](#다국어-지원-multilingual) - [블로그 포스트 작성](#블로그-포스트-작성) - [로컬 개발 서버 실행](#로컬-개발-서버-실행) +- [Pre-commit (1MB 초과 파일 체크)](#pre-commit-1mb-초과-파일-체크) - [포스트 배포](#포스트-배포) ## Repository clone 받기 @@ -413,6 +414,40 @@ hugo server hugo server -p 8080 ``` +## 🔒 Pre-commit (1MB 초과 파일 체크) + +커밋 시 **1MB를 초과하는 파일**이 스테이징되면 커밋이 막혀 저장소 용량이 불필요하게 커지는 것을 방지합니다. + +### 설치 및 활성화 + +```bash +# pre-commit 설치 +pip install pre-commit +# 또는 macOS: brew install pre-commit + +# 훅 설치 (최초 1회) +pre-commit install +``` + +### 동작 + +- `git commit` 시 스테이징된 파일 중 1MB 초과 파일이 있으면 커밋이 거부됩니다. +- 1MB 이하로 압축하거나, [Git LFS](https://git-lfs.com/)로 대용량 파일을 관리한 뒤 커밋하세요. + +### 수동 실행 + +```bash +# 스테이징된 파일에 대해 검사 +pre-commit run + +# 전체 트리 검사 (--all-files) +pre-commit run --all-files +``` + +### GitHub Actions + +PR 또는 `main`에 push할 때 [Check large files](.github/workflows/check-large-files.yml) 워크플로우가 pre-commit과 동일하게 `check-added-large-files`를 실행합니다 (`--all-files`로 전체 저장소 검사). + ## 📤 포스트 배포 ### 1. 포스트 완성 후 초안 해제 diff --git a/content/posts/pytorchcon2025-report/SGLang.png b/content/posts/pytorchcon2025-report/SGLang.png index 984e812..e347a6d 100644 Binary files a/content/posts/pytorchcon2025-report/SGLang.png and b/content/posts/pytorchcon2025-report/SGLang.png differ diff --git a/content/posts/pytorchcon2025-report/accelerator_privateuse.png b/content/posts/pytorchcon2025-report/accelerator_privateuse.png index 455df28..4a671eb 100644 Binary files a/content/posts/pytorchcon2025-report/accelerator_privateuse.png and b/content/posts/pytorchcon2025-report/accelerator_privateuse.png differ diff --git a/content/posts/pytorchcon2025-report/cutile.png b/content/posts/pytorchcon2025-report/cutile.png index c5c71ae..19cff30 100644 Binary files a/content/posts/pytorchcon2025-report/cutile.png and b/content/posts/pytorchcon2025-report/cutile.png differ diff --git a/content/posts/pytorchcon2025-report/executorch.png b/content/posts/pytorchcon2025-report/executorch.png index 215b38c..598062b 100644 Binary files a/content/posts/pytorchcon2025-report/executorch.png and b/content/posts/pytorchcon2025-report/executorch.png differ diff --git a/content/posts/pytorchcon2025-report/helion.png b/content/posts/pytorchcon2025-report/helion.png index a49d691..642e796 100644 Binary files a/content/posts/pytorchcon2025-report/helion.png and b/content/posts/pytorchcon2025-report/helion.png differ diff --git a/content/posts/pytorchcon2025-report/llm-d.png b/content/posts/pytorchcon2025-report/llm-d.png index baf442e..6e8ab30 100644 Binary files a/content/posts/pytorchcon2025-report/llm-d.png and b/content/posts/pytorchcon2025-report/llm-d.png differ diff --git a/content/posts/pytorchcon2025-report/monarch.png b/content/posts/pytorchcon2025-report/monarch.png index 8602d8e..a25a5b6 100644 Binary files a/content/posts/pytorchcon2025-report/monarch.png and b/content/posts/pytorchcon2025-report/monarch.png differ diff --git a/content/posts/pytorchcon2025-report/ray.png b/content/posts/pytorchcon2025-report/ray.png index ddf3073..06997b2 100644 Binary files a/content/posts/pytorchcon2025-report/ray.png and b/content/posts/pytorchcon2025-report/ray.png differ diff --git a/content/posts/pytorchcon2025-report/spotify_vllm_tpu.png b/content/posts/pytorchcon2025-report/spotify_vllm_tpu.png index 65f59bc..dfb4374 100644 Binary files a/content/posts/pytorchcon2025-report/spotify_vllm_tpu.png and b/content/posts/pytorchcon2025-report/spotify_vllm_tpu.png differ diff --git a/content/posts/pytorchcon2025-report/torchcomms.png b/content/posts/pytorchcon2025-report/torchcomms.png index 1da7b78..0f41b9b 100644 Binary files a/content/posts/pytorchcon2025-report/torchcomms.png and b/content/posts/pytorchcon2025-report/torchcomms.png differ diff --git a/content/posts/pytorchcon2025-report/vLLM.png b/content/posts/pytorchcon2025-report/vLLM.png index b0c10af..10f7170 100644 Binary files a/content/posts/pytorchcon2025-report/vLLM.png and b/content/posts/pytorchcon2025-report/vLLM.png differ