From 13b22a6213446592c8ded87756109d2c05174859 Mon Sep 17 00:00:00 2001 From: Will Sackfield Date: Thu, 23 Jan 2025 16:46:11 -0500 Subject: [PATCH] Add test for ffmpeg in base images --- .../fixtures/ffmpeg-package/cog.yaml | 9 +++++++++ test-integration/test_integration/test_build.py | 12 ++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 test-integration/test_integration/fixtures/ffmpeg-package/cog.yaml diff --git a/test-integration/test_integration/fixtures/ffmpeg-package/cog.yaml b/test-integration/test_integration/fixtures/ffmpeg-package/cog.yaml new file mode 100644 index 0000000000..5c9a8ef079 --- /dev/null +++ b/test-integration/test_integration/fixtures/ffmpeg-package/cog.yaml @@ -0,0 +1,9 @@ +build: + gpu: true + python_version: "3.9" + python_packages: + - "torch==2.5.1" + cuda: "12.4" + run: + - command: ffmpeg --help +predict: "predict.py:Predictor" diff --git a/test-integration/test_integration/test_build.py b/test-integration/test_integration/test_build.py index d6a46cec57..8bf718deb8 100644 --- a/test-integration/test_integration/test_build.py +++ b/test-integration/test_integration/test_build.py @@ -434,3 +434,15 @@ def test_pydantic2(docker_image): ) assert build_process.returncode == 0 + + +def test_ffmpeg_base_image(docker_image): + project_dir = Path(__file__).parent / "fixtures/ffmpeg-package" + + build_process = subprocess.run( + ["cog", "build", "-t", docker_image], + cwd=project_dir, + capture_output=True, + ) + + assert build_process.returncode == 0