Skip to content

Instantly share code, notes, and snippets.

View DhanshreeA's full-sized avatar
👽
Alien-ing

Dhanshree Arora DhanshreeA

👽
Alien-ing
View GitHub Profile
@DhanshreeA
DhanshreeA / llamafile_completions.py
Last active October 23, 2024 09:14
Llamafile with LlamaIndex bug repro scenario
# This DOES NOT work.
# The complete method exits with a TimeOut
# The Llamafile server becomes unresponsive with no active GPU utilisation.
from llama_index.core import PromptTemplate
from llama_index.llms.llamafile import Llamafile
BASE_URL = "http://127.0.0.1:8080"
EOF_TOKEN = "<|eot_id|>"

Retrieving Docker Image Sizes

There are two metrics that are important to consider when discussing the size of Docker images.

  1. Compressed size - This is often referred to as the wire size. This affects how fast/slow images can be pulled from a registry. This impacts the first run experience on machines where images are not cached.
  2. Uncompressed size - This is often referred to as the size on disk. This affects how much local storage is required to support your Docker workloads.

The example commands shown below will work on Windows, MacOS, and Linux.

How to Measure the Compressed Size