Include .git directory in Docker build for HF Spaces compatibility
Browse filesHuggingFace Spaces syncs the repository but doesn't include .git directory
by default. Including it in the Docker build ensures git operations work
during container runtime, enabling faster development iteration.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Dockerfile +2 -1
Dockerfile
CHANGED
|
@@ -12,8 +12,9 @@ COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
|
| 12 |
|
| 13 |
WORKDIR /app
|
| 14 |
|
| 15 |
-
# Copy project files
|
| 16 |
COPY pyproject.toml README.md ./
|
|
|
|
| 17 |
COPY src/ ./src/
|
| 18 |
COPY data/*.csv data/metadata/ ./data/
|
| 19 |
|
|
|
|
| 12 |
|
| 13 |
WORKDIR /app
|
| 14 |
|
| 15 |
+
# Copy project files (including .git for faster HF Spaces dev)
|
| 16 |
COPY pyproject.toml README.md ./
|
| 17 |
+
COPY .git/ ./.git/
|
| 18 |
COPY src/ ./src/
|
| 19 |
COPY data/*.csv data/metadata/ ./data/
|
| 20 |
|