File tree Expand file tree Collapse file tree 2 files changed +8
-21
lines changed
Expand file tree Collapse file tree 2 files changed +8
-21
lines changed Original file line number Diff line number Diff line change @@ -21,30 +21,17 @@ uv venv
2121uv sync --all-groups
2222```
2323
24- ### Building
25-
26- Cog is composed of three components that are built separately:
27-
28- - ** Python SDK** (` python/cog/ ` ) — the Python library that model authors use. Built into a wheel that gets installed inside containers.
29- - ** Coglet** (` crates/ ` ) — a Rust prediction server that runs inside containers. Cross-compiled into a Linux wheel.
30- - ** Cog CLI** (` cmd/cog/ ` , ` pkg/ ` ) — the Go command-line tool. Embeds the SDK wheel and picks up the coglet wheel from ` dist/ ` .
24+ ### Build & install
3125
3226``` sh
33- # Build everything and install
34- mise run build:sdk # build the Python SDK wheel
35- mise run build:coglet:wheel:linux-x64 # cross-compile the coglet wheel for Linux containers
36- mise run build:cog # build the Go CLI (embeds SDK, picks up coglet from dist/)
37- sudo mise run install # symlink the binary to /usr/local/bin
38- ```
27+ mise run build
3928
40- After making changes, rebuild only the component you changed and then ` build:cog ` :
41-
42- ``` sh
43- mise run build:sdk # after changing python/cog/
44- mise run build:coglet:wheel:linux-x64 # after changing crates/
45- mise run build:cog # after changing cmd/cog/ or pkg/, or to pick up new wheels
29+ # symlink the binary to /usr/local/bin
30+ sudo mise run install
4631```
4732
33+ After making changes, run ` mise run build ` to rebuild and it will get picked up by the symlink.
34+
4835### Common tasks
4936
5037``` sh
Original file line number Diff line number Diff line change 1414#
1515# Cached tasks:
1616# - build:sdk - skips if python/**/*.py unchanged
17- # - build:coglet:wheel* - skips if crates/**/*.rs unchanged
17+ # - build:coglet:wheel* - skips if crates/**/*.rs unchanged
1818# - generate:stubs - skips if coglet-python source unchanged
1919# - generate:compat - skips if tools/compatgen unchanged
2020# - docs - skips if docs/**/*.md unchanged
@@ -95,7 +95,7 @@ run = "rm -f dist/cog-*.whl dist/cog-*.tar.gz dist/coglet-*.whl"
9595alias = " build:all"
9696description = " Build all components"
9797run = [
98- { tasks = [" build:cog" , " build:coglet" , " build:sdk" ] },
98+ { tasks = [" build:cog" , " build:coglet:wheel:linux-x64 " , " build:sdk" ] },
9999]
100100
101101[tasks .install ]
You can’t perform that action at this time.
0 commit comments