Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
parakeet.cpp/Dockerfile at master · mudler/parakeet.cpp · GitHub
Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Events
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mudler
parakeet.cpp
Repository navigation
Code
Issues
14
(14)
Pull requests
7
(7)
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
parakeet.cpp
/
Dockerfile
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
118 lines (104 loc) · 4.97 KB
master
Breadcrumbs
parakeet.cpp
/
Dockerfile
Copy path
Top
File metadata and controls
Code
Blame
118 lines (104 loc) · 4.97 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#
parakeet.cpp container image.
#
#
Multi-stage build: a fat build stage compiles parakeet-cli and
#
parakeet-server (and the ggml backends they link against), then slim runtime
#
stages carry only one binary plus the ggml shared libraries. Two runtime
#
targets are exposed:
#
--target runtime the cli image (default)
#
--target runtime-server the OpenAI-compatible HTTP server image
#
#
The same Dockerfile produces the CPU and CUDA variants. Select with build
#
args:
#
#
CPU (default):
#
docker build -t parakeet.cpp:cpu .
#
#
CUDA (GGML_CUDA_NO_VMM=ON drops the libcuda driver-lib link dependency,
#
which a GPU-less build container does not have):
#
docker build -t parakeet.cpp:cuda \
#
--build-arg BUILD_BASE=nvidia/cuda:13.0.1-devel-ubuntu24.04 \
#
--build-arg RUNTIME_BASE=nvidia/cuda:13.0.1-runtime-ubuntu24.04 \
#
--build-arg "CMAKE_EXTRA_ARGS=-DPARAKEET_GGML_CUDA=ON -DGGML_CUDA_NO_VMM=ON" .
#
#
The build context must be a checkout with the ggml submodule populated
#
(git clone --recursive, or actions/checkout with submodules: recursive).
#
Models are not bundled: mount a pre-converted .gguf at runtime.
ARG
BUILD_BASE=ubuntu:24.04
ARG
RUNTIME_BASE=ubuntu:24.04
#
---------------------------------------------------------------------------
#
build: configure + compile parakeet-cli and the ggml backends.
#
---------------------------------------------------------------------------
FROM
${BUILD_BASE} AS build
#
Extra cmake flags appended verbatim (e.g. -DPARAKEET_GGML_CUDA=ON).
ARG
CMAKE_EXTRA_ARGS=
""
#
CUDA architectures, passed as a quoted CMAKE_CUDA_ARCHITECTURES list so the
#
';' separator survives the shell (e.g. "90;121-real"). Empty = let ggml pick
#
its default broad list. Kept separate from CMAKE_EXTRA_ARGS for that reason.
ARG
CUDA_ARCHS=
""
ENV
DEBIAN_FRONTEND=noninteractive
RUN
apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cmake \
git \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR
/src
COPY
. .
#
CMake auto-applies the in-tree ggml patches during configure via
#
scripts/apply_ggml_patches.sh, which uses `git apply` and therefore needs
#
third_party/ggml to be a git repo. Re-init it as a throwaway repo so this
#
works regardless of how the submodule arrived in the build context.
RUN
rm -rf third_party/ggml/.git && git -C third_party/ggml init -q
#
GGML_NATIVE=OFF keeps the binary portable across the CPUs that will pull the
#
published image (no host-specific ISA extensions baked in). GGML_LLAMAFILE
#
stays on (forced by CMakeLists) for the tinyBLAS SGEMM speedup.
RUN
cmake -B build \
-DCMAKE_BUILD_TYPE=Release \
-DGGML_NATIVE=OFF \
-DPARAKEET_BUILD_CLI=ON \
-DPARAKEET_BUILD_SERVER=ON \
-DPARAKEET_BUILD_TESTS=OFF \
${CMAKE_EXTRA_ARGS} \
${CUDA_ARCHS:+
"-DCMAKE_CUDA_ARCHITECTURES=${CUDA_ARCHS}"
} \
&& cmake --build build -j
"$(nproc)"
#
Stage both binaries and every backend shared library (CPU, and CUDA when
#
built) into a clean prefix the runtime stages copy from. The cli and server
#
images each pick only the binary they ship.
RUN
mkdir -p /install/bin /install/lib \
&& cp build/examples/cli/parakeet-cli /install/bin/ \
&& cp build/examples/server/parakeet-server /install/bin/ \
&& find build -name
'*.so*'
-exec cp -av {} /install/lib/
\;
#
---------------------------------------------------------------------------
#
runtime-base: shared slim layer with the ggml backend libraries. The cli and
#
server targets below add their own binary and entrypoint on top.
#
---------------------------------------------------------------------------
FROM
${RUNTIME_BASE} AS runtime-base
ENV
DEBIAN_FRONTEND=noninteractive
RUN
apt-get update && apt-get install -y --no-install-recommends \
libgomp1 \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY
--from=build /install/lib/ /usr/local/lib/
RUN
ldconfig
WORKDIR
/work
#
---------------------------------------------------------------------------
#
runtime-server: the OpenAI-compatible HTTP server. Binds 0.0.0.0 so the
#
published port is reachable from outside the container; curl is added so
#
`--model <alias>` can fetch a published model on first run.
#
---------------------------------------------------------------------------
FROM
runtime-base AS runtime-server
RUN
apt-get update && apt-get install -y --no-install-recommends \
curl \
&& rm -rf /var/lib/apt/lists/*
COPY
--from=build /install/bin/parakeet-server /usr/local/bin/
EXPOSE
8080
ENTRYPOINT
[
"parakeet-server"
,
"--host"
,
"0.0.0.0"
]
CMD
[
"--help"
]
#
---------------------------------------------------------------------------
#
runtime: the cli image. Kept last so a plain `docker build .` (no --target)
#
still produces the cli image exactly as before.
#
---------------------------------------------------------------------------
FROM
runtime-base AS runtime
COPY
--from=build /install/bin/parakeet-cli /usr/local/bin/
ENTRYPOINT
[
"parakeet-cli"
]
CMD
[
"--help"
]
You can’t perform that action at this time.