Skip to content

Commit

Permalink
Dropping support for python 3.7, 3.8; adding 3.13
Browse files Browse the repository at this point in the history
meaning that the minimum allowed version is 3.9
  • Loading branch information
meatballhat committed Oct 25, 2024
1 parent a8e138f commit 66178a1
Show file tree
Hide file tree
Showing 23 changed files with 507 additions and 378 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@ jobs:
matrix:
pydantic: ["1", "2"]
python-version: ${{ fromJson(needs.build-python.outputs.python-versions) }}
exclude:
# Pydantic 2 is not supported on Python 3.7
- pydantic: "2"
python-version: "3.7"
steps:
- name: Download pre-built packages
uses: actions/download-artifact@v4
Expand All @@ -115,7 +111,6 @@ jobs:
echo TOX_PYTHON=py$(echo "${{ matrix.python-version }}" | tr -d .) >>$GITHUB_ENV
uv pip install --system tox
- run: uv pip install --system tox-uv
if: matrix.python-version != '3.7'
- name: Remove src to ensure tests run against wheel
run: rm -rf python/cog
- name: Test
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var (

const (
MinimumMajorPythonVersion int = 3
MinimumMinorPythonVersion int = 8
MinimumMinorPythonVersion int = 9
MinimumMajorCudaVersion int = 11
)

Expand Down
16 changes: 8 additions & 8 deletions pkg/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func TestValidateModelPythonVersion(t *testing.T) {
},
{
name: "MinimumVersion",
input: "3.8",
input: "3.9",
expectedErr: false,
},
{
Expand All @@ -44,7 +44,7 @@ func TestValidateModelPythonVersion(t *testing.T) {
},
{
name: "LessThanMinimum",
input: "3.7",
input: "3.8",
expectedErr: true,
},
}
Expand Down Expand Up @@ -650,14 +650,14 @@ func TestBlankBuild(t *testing.T) {
}

func TestModelPythonVersionValidation(t *testing.T) {
err := ValidateModelPythonVersion("3.8")
err := ValidateModelPythonVersion("3.9")
require.NoError(t, err)
err = ValidateModelPythonVersion("3.8.1")
err = ValidateModelPythonVersion("3.9.20")
require.NoError(t, err)
err = ValidateModelPythonVersion("3.7")
require.Equal(t, "minimum supported Python version is 3.8. requested 3.7", err.Error())
err = ValidateModelPythonVersion("3.7.1")
require.Equal(t, "minimum supported Python version is 3.8. requested 3.7.1", err.Error())
err = ValidateModelPythonVersion("3.8")
require.Equal(t, "minimum supported Python version is 3.9. requested 3.8", err.Error())
err = ValidateModelPythonVersion("3.8.15")
require.Equal(t, "minimum supported Python version is 3.9. requested 3.8.15", err.Error())
}

func TestSplitPinnedPythonRequirement(t *testing.T) {
Expand Down
83 changes: 80 additions & 3 deletions pkg/config/cuda_base_images.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,92 @@
[
{
"Tag": "12.6.2-cudnn-devel-ubuntu24.04",
"CUDA": "12.6.2",
"CuDNN": "",
"IsDevel": true,
"Ubuntu": "24.04"
},
{
"Tag": "12.6.2-cudnn-devel-ubuntu22.04",
"CUDA": "12.6.2",
"CuDNN": "",
"IsDevel": true,
"Ubuntu": "22.04"
},
{
"Tag": "12.6.2-cudnn-devel-ubuntu20.04",
"CUDA": "12.6.2",
"CuDNN": "",
"IsDevel": true,
"Ubuntu": "20.04"
},
{
"Tag": "12.6.1-cudnn-devel-ubuntu24.04",
"CUDA": "12.6.1",
"CuDNN": "",
"IsDevel": true,
"Ubuntu": "24.04"
},
{
"Tag": "12.6.1-cudnn-devel-ubuntu22.04",
"CUDA": "12.6.1",
"CuDNN": "",
"IsDevel": true,
"Ubuntu": "22.04"
},
{
"Tag": "12.6.1-cudnn-devel-ubuntu20.04",
"CUDA": "12.6.1",
"CuDNN": "",
"IsDevel": true,
"Ubuntu": "20.04"
},
{
"Tag": "12.6.0-cudnn-devel-ubuntu24.04",
"CUDA": "12.6.0",
"CuDNN": "",
"IsDevel": true,
"Ubuntu": "24.04"
},
{
"Tag": "12.6.0-cudnn-devel-ubuntu22.04",
"CUDA": "12.6.0",
"CuDNN": "",
"IsDevel": true,
"Ubuntu": "22.04"
},
{
"Tag": "12.6.0-cudnn-devel-ubuntu20.04",
"CUDA": "12.6.0",
"CuDNN": "",
"IsDevel": true,
"Ubuntu": "20.04"
},
{
"Tag": "12.5.1-cudnn-devel-ubuntu22.04",
"CUDA": "12.5.1",
"CuDNN": "",
"IsDevel": true,
"Ubuntu": "22.04"
},
{
"Tag": "12.5.1-cudnn-devel-ubuntu20.04",
"CUDA": "12.5.1",
"CuDNN": "",
"IsDevel": true,
"Ubuntu": "20.04"
},
{
"Tag": "12.4.1-cudnn-devel-ubuntu22.04",
"CUDA": "12.4.1",
"CuDNN": "9",
"CuDNN": "",
"IsDevel": true,
"Ubuntu": "22.04"
},
{
"Tag": "12.4.1-cudnn-devel-ubuntu20.04",
"CUDA": "12.4.1",
"CuDNN": "9",
"CuDNN": "",
"IsDevel": true,
"Ubuntu": "20.04"
},
Expand Down Expand Up @@ -286,4 +363,4 @@
"IsDevel": true,
"Ubuntu": "16.04"
}
]
]
13 changes: 13 additions & 0 deletions pkg/config/tf_compatibility_matrix.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
[
{
"TF": "2.17.0",
"TFCPUPackage": "tensorflow==2.17.0",
"TFGPUPackage": "tensorflow==2.17.0",
"CUDA": "12.3",
"CuDNN": "8.9",
"Pythons": [
"3.9",
"3.10",
"3.11",
"3.12"
]
},
{
"TF": "2.16.1",
"TFCPUPackage": "tensorflow==2.16.1",
Expand Down
Loading

0 comments on commit 66178a1

Please sign in to comment.