Georg Claude Sonnet 4.5 commited on
Commit
42ce71e
·
1 Parent(s): f5d32da

Fix Dockerfile structure for faster rebuilds

Browse files

Move app file copying from Dockerfile.base to main Dockerfile.
This ensures changes to app.py, client.py, or estimator.py trigger
rebuilds without requiring base image rebuild.

Changes:
- Dockerfile: Add COPY for application files before CMD
- Dockerfile.base: Remove COPY (base image is cached)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

Files changed (2) hide show
  1. Dockerfile +3 -0
  2. Dockerfile.base +2 -2
Dockerfile CHANGED
@@ -22,4 +22,7 @@ RUN cd bundlesdf/mycuda && pip install . --no-build-isolation
22
  # Note: mycpp build, weights download, and build deps are already in base image
23
  WORKDIR /app
24
 
 
 
 
25
  CMD ["python3", "app.py"]
 
22
  # Note: mycpp build, weights download, and build deps are already in base image
23
  WORKDIR /app
24
 
25
+ # Copy application files (placed here so changes don't require base image rebuild)
26
+ COPY app.py client.py estimator.py ./
27
+
28
  CMD ["python3", "app.py"]
Dockerfile.base CHANGED
@@ -89,7 +89,7 @@ WORKDIR /app
89
  RUN python3 -c "from huggingface_hub import snapshot_download; \
90
  snapshot_download(repo_id='gpue/foundationpose-weights', local_dir='weights', repo_type='model')"
91
 
92
- # Copy application files
93
- COPY app.py client.py estimator.py ./
94
 
95
  EXPOSE 7860
 
89
  RUN python3 -c "from huggingface_hub import snapshot_download; \
90
  snapshot_download(repo_id='gpue/foundationpose-weights', local_dir='weights', repo_type='model')"
91
 
92
+ # Note: Application files (app.py, client.py, estimator.py) are copied in main Dockerfile
93
+ # This allows updates without rebuilding the entire base image
94
 
95
  EXPOSE 7860