Skip to content

Commit

Permalink
llama-2 presets: Add dockerignore file (#765)
Browse files Browse the repository at this point in the history
This commit adds a dockerignore file for the llama-2 preset. This change
will ignore copying the `.git` folder while building the docker image.

**Reason for Change**:

This change was added to reduce the model image size by ignoring the
`.git` folder while building the docker image.

Before this change:

```console
$ docker images
REPOSITORY                TAG          IMAGE ID       CREATED        SIZE
meta-llama/llama-2-70b    1cb3547      4715d3ed9f6b   10 hours ago   289GB
```

After this change:

```console
$ docker images
REPOSITORY                TAG          IMAGE ID       CREATED        SIZE
meta-llama/llama-2-70b    1cb3547      6527d68eae17   2 days ago     151GB
```

52% reduction in image size for this model. And for any repository that
is mature enough with model updates the size reduction difference will
be more.

**Issue Fixed**:

Partially fixes #764. Partially because it is not fixing all the models
out there. Just for this one llama2.

Signed-off-by: Suraj Deshmukh <[email protected]>
  • Loading branch information
surajssd authored Dec 9, 2024
1 parent eb2bff2 commit 07d50f7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docker/presets/models/llama-2/Dockerfile.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/.git

0 comments on commit 07d50f7

Please sign in to comment.