@@ -47,7 +47,6 @@ const StripDebugSymbolsCommand = "find / -type f -name \"*python*.so\" -not -nam
4747const CFlags = "ENV CFLAGS=\" -O3 -funroll-loops -fno-strict-aliasing -flto -S\" "
4848const PrecompilePythonCommand = "RUN find / -type f -name \" *.py[co]\" -delete && find / -type f -name \" *.py\" -exec touch -t 197001010000 {} \\ ; && find / -type f -name \" *.py\" -printf \" %h\\ n\" | sort -u | /usr/bin/python3 -m compileall --invalidation-mode timestamp -o 2 -j 0"
4949const STANDARD_GENERATOR_NAME = "STANDARD_GENERATOR"
50- const PinnedCogletURL = "https://github.com/replicate/cog-runtime/releases/download/v0.1.0-beta10/coglet-0.1.0b10-py3-none-any.whl" // Pinned coglet URL to avoid API dependency
5150
5251type StandardGenerator struct {
5352 Config * config.Config
@@ -475,8 +474,6 @@ func (g *StandardGenerator) installCog() (string, error) {
475474 switch wheelConfig .Source {
476475 case wheels .WheelSourceCog :
477476 installLines , err = g .installEmbeddedCogWheel ()
478- case wheels .WheelSourceCogletAlpha :
479- installLines , err = g .installCogletAlpha ()
480477 case wheels .WheelSourceCogDataclass :
481478 installLines , err = g .installEmbeddedCogDataclassWheel ()
482479 case wheels .WheelSourceURL :
@@ -493,18 +490,13 @@ func (g *StandardGenerator) installCog() (string, error) {
493490
494491 // Optionally install Rust coglet wheel alongside cog
495492 // This allows testing the Rust HTTP server implementation
496- // WARNING: Cannot install Rust coglet when using coglet-alpha
497493 if rustWheelPath := os .Getenv ("COGLET_RUST_WHEEL" ); rustWheelPath != "" {
498- if wheelConfig != nil && wheelConfig .Source == wheels .WheelSourceCogletAlpha {
499- fmt .Fprintf (os .Stderr , "WARNING: COGLET_RUST_WHEEL is set but COG_WHEEL=coglet-alpha. Rust coglet cannot be installed alongside coglet-alpha (Go implementation). Skipping Rust coglet installation.\n " )
500- } else {
501- rustInstall , err := g .installRustCogletWheel (rustWheelPath )
502- if err != nil {
503- return "" , fmt .Errorf ("failed to install Rust coglet wheel: %w" , err )
504- }
505- if rustInstall != "" {
506- installLines += "\n " + rustInstall
507- }
494+ rustInstall , err := g .installRustCogletWheel (rustWheelPath )
495+ if err != nil {
496+ return "" , fmt .Errorf ("failed to install Rust coglet wheel: %w" , err )
497+ }
498+ if rustInstall != "" {
499+ installLines += "\n " + rustInstall
508500 }
509501 }
510502
@@ -545,23 +537,6 @@ func (g *StandardGenerator) installEmbeddedCogDataclassWheel() (string, error) {
545537 return strings .Join (lines , "\n " ), nil
546538}
547539
548- // installCogletAlpha installs coglet from the pinned URL (default for cog_runtime: true)
549- func (g * StandardGenerator ) installCogletAlpha () (string , error ) {
550- // We need fast-* compliant Python version to reconstruct coglet venv PYTHONPATH
551- if ! CheckMajorMinorOnly (g .Config .Build .PythonVersion ) {
552- return "" , fmt .Errorf ("Python version must be <major>.<minor>" )
553- }
554- cmds := []string {
555- "ENV R8_COG_VERSION=coglet" ,
556- "ENV R8_PYTHON_VERSION=" + g .Config .Build .PythonVersion ,
557- // Uninstall cog first to avoid conflicts with coglet's cog shim package.
558- // Some base images (e.g. r8.im/cog-base) have cog pre-installed, which conflicts
559- // with coglet's cog compatibility shim that provides the same module paths.
560- "RUN pip uninstall -y cog 2>/dev/null || true && pip install " + PinnedCogletURL ,
561- }
562- return strings .Join (cmds , "\n " ), nil
563- }
564-
565540// installWheelFromURL installs a wheel from a URL (when COG_WHEEL=https://...)
566541func (g * StandardGenerator ) installWheelFromURL (url string ) (string , error ) {
567542 // Set coglet env vars if this looks like a coglet wheel
0 commit comments