File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Cog 0.17.0-rc.2
2+
3+ ## Prerelease CLI
4+
5+ ``` bash
6+ # macOS ARM
7+ sudo curl -o /usr/local/bin/cog -L \
8+ https://github.com/replicate/cog/releases/download/v0.17.0-rc.2/cog_Darwin_arm64
9+ sudo chmod +x /usr/local/bin/cog
10+ sudo xattr -d com.apple.quarantine /usr/local/bin/cog
11+ ```
12+
13+ ## Prerelease SDK
14+
15+ Pin ` sdk_version ` in your ` cog.yaml ` to use the RC SDK and coglet inside the container:
16+
17+ ``` yaml
18+ build :
19+ python_version : " 3.14"
20+ python_requirements : requirements.txt
21+ sdk_version : " 0.17.0rc2"
22+ predict : " predict.py:Predictor"
23+ ` ` `
24+
25+ Without ` sdk_version`, the CLI installs whatever SDK version it was built with.
26+ The RC coglet (Rust HTTP server) is pulled automatically as a dependency of the SDK.
27+
28+ # # Try it
29+
30+ ` ` ` bash
31+ cd examples/rc
32+ cog predict -i text=hello
33+ # => HELLO
34+ ` ` `
35+
36+ Add `--debug` to see the coglet boot logs with version info.
Original file line number Diff line number Diff line change 1+ build :
2+ python_version : " 3.14"
3+ python_requirements : requirements.txt
4+
5+ # Pin to the 0.17.0 RC SDK. Remove this line to use the default
6+ # SDK version bundled with your cog CLI.
7+ sdk_version : " 0.17.0rc2"
8+
9+ predict : " predict.py:Predictor"
Original file line number Diff line number Diff line change 1+ from cog import BasePredictor , Input
2+
3+
4+ class Predictor (BasePredictor ):
5+ def setup (self ) -> None :
6+ pass
7+
8+ def predict (self , text : str = Input (description = "Input text" )) -> str :
9+ return text .upper ()
Original file line number Diff line number Diff line change 1+ # Add your model dependencies here, e.g.:
2+ # torch==2.6.0
3+ # transformers
You can’t perform that action at this time.
0 commit comments