Skip to content

Commit cb1aa53

Browse files
committed
🔧 fix split to take into account the base docker image
1 parent 659d8a3 commit cb1aa53

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

merle/model_split.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@
2626
HTTP_OK = 200
2727

2828
# Docker image size limits
29-
# Lambda container image max is 10GB, leave room for base image + dependencies
30-
DOCKER_IMAGE_MAX_SIZE_BYTES = 10 * 1024 * 1024 * 1024 # 10GB
31-
BASE_IMAGE_OVERHEAD_BYTES = 2 * 1024 * 1024 * 1024 # ~2GB for base image + deps
32-
MAX_MODEL_SIZE_IN_IMAGE = DOCKER_IMAGE_MAX_SIZE_BYTES - BASE_IMAGE_OVERHEAD_BYTES # ~8GB
29+
# Lambda container image max is 10GB uncompressed
30+
# Base image (Python runtime, Ollama, dependencies) is ~5GB
31+
# This leaves ~5GB for the model in the Docker image
32+
DOCKER_IMAGE_MAX_SIZE_BYTES = 10 * 1024 * 1024 * 1024 # 10GB Lambda limit
33+
BASE_IMAGE_OVERHEAD_BYTES = 5 * 1024 * 1024 * 1024 # ~5GB for base image + deps
34+
MAX_MODEL_SIZE_IN_IMAGE = DOCKER_IMAGE_MAX_SIZE_BYTES - BASE_IMAGE_OVERHEAD_BYTES # ~5GB for model
3335

3436
# Split metadata filename
3537
SPLIT_METADATA_FILE = "split_metadata.json"

0 commit comments

Comments
 (0)