Skip to content

Commit 4beb1e7

Browse files
authored
Merge pull request #164 from arjunrajlaboratory/chore/dockerignore
chore(docker): add a .dockerignore to keep the build context small
2 parents 13e990d + 8529d6d commit 4beb1e7

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

‎.dockerignore‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Keep the build context small. Every `docker build` sends the whole context to
2+
# the daemon before running a single instruction, and every worker here builds
3+
# from the repo root (`docker build .`), so anything large sitting anywhere in
4+
# the tree is paid for by all 107 Dockerfiles.
5+
#
6+
# Nothing listed below is referenced by any COPY/ADD in the repo -- verified by
7+
# grepping every Dockerfile. Worker COPY lines name specific files
8+
# (entrypoint.py, environment.yml, ...) rather than whole directories, and the
9+
# directories that are copied wholesale (annotation_utilities, worker_client)
10+
# only lose their stale __pycache__.
11+
12+
.git
13+
.github
14+
15+
# Local development scratch: per-worker virtualenvs and downloaded model
16+
# checkpoints. These are gitignored, never copied into an image, and are by far
17+
# the biggest thing in the context -- on a working checkout they can add ~11 GB
18+
# (e.g. a 2.6 GB sam_vit_h checkpoint plus several torch/CUDA venvs).
19+
**/local_tests
20+
**/.venv
21+
22+
# Compiled bytecode: stale, platform-specific, and regenerated inside the image.
23+
**/__pycache__
24+
**/*.py[cod]

0 commit comments

Comments
 (0)