Skip to content

Commit

Permalink
Workaround for fastapi in base image not working with pydantic 2
Browse files Browse the repository at this point in the history
  • Loading branch information
nevillelyh committed Jan 17, 2025
1 parent 2f12ead commit bc9907e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/config/requirements.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ func GenerateRequirements(tmpDir string, config *Config) (string, error) {
}
}

// Workaround for fastapi in base image not working with pydantic 2
// https://github.com/replicate/cog/issues/2112
if _, ok := packageNames["fastapi"]; !ok {
packageNames["fastapi"] = ">0.100.0,<0.111.0"
}

// If we don't have any packages skip further processing
if len(packageNames) == 0 {
return "", nil
Expand Down

0 comments on commit bc9907e

Please sign in to comment.