-
Notifications
You must be signed in to change notification settings - Fork 5
fix: ensure Ubuntu-based base images work as expected; change default to vanilla Debian #115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
3d0c2ef
test with other base images
dionhaefner 3c8dbfb
Merge branch 'main' into dion/base-images
dionhaefner 45b854d
tests pass now
dionhaefner a07df91
chown tesseract_api.py
dionhaefner 0e992a4
merge main
dionhaefner 2a51c36
fix test
dionhaefner 5eaaf9a
add separate example for cuda image build
dionhaefner aa2b400
Merge branch 'main' into dion/base-images
dionhaefner 72f7107
wip on cuda tesseract
dionhaefner fe9530f
use cuda library for check instead
dionhaefner e0ed4b0
Merge branch 'main' into dion/base-images
dionhaefner 9be6db0
Merge branch 'main' into dion/base-images
dionhaefner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| # Copyright 2025 Pasteur Labs. All Rights Reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| # Tesseract API module for cuda-image | ||
| # Generated by tesseract 0.8.2.dev14+g494ed54.d20250401 on 2025-04-04T18:55:51.909676 | ||
|
|
||
|
|
||
| from pydantic import BaseModel | ||
|
|
||
| # | ||
| # Schemas | ||
| # | ||
|
|
||
|
|
||
| class InputSchema(BaseModel): | ||
| pass | ||
|
|
||
|
|
||
| class OutputSchema(BaseModel): | ||
| pass | ||
|
|
||
|
|
||
| # | ||
| # Required endpoints | ||
| # | ||
|
|
||
|
|
||
| def apply(inputs: InputSchema) -> OutputSchema: | ||
| """Assert that CUDA is available.""" | ||
| from ctypes.util import find_library | ||
|
|
||
| cudart = find_library("cudart") | ||
| assert cudart is not None, "CUDA runtime library not found" | ||
| return OutputSchema() | ||
|
|
||
|
|
||
| # | ||
| # Optional endpoints | ||
| # | ||
|
|
||
| # import numpy as np | ||
|
|
||
| # def jacobian(inputs: InputSchema, jac_inputs: set[str], jac_outputs: set[str]): | ||
| # return {} | ||
|
|
||
| # def jacobian_vector_product( | ||
| # inputs: InputSchema, | ||
| # jvp_inputs: set[str], | ||
| # jvp_outputs: set[str], | ||
| # tangent_vector: dict[str, np.typing.ArrayLike] | ||
| # ) -> dict[str, np.typing.ArrayLike]: | ||
| # return {} | ||
|
|
||
| # def vector_jacobian_product( | ||
| # inputs: InputSchema, | ||
| # vjp_inputs: set[str], | ||
| # vjp_outputs: set[str], | ||
| # cotangent_vector: dict[str, np.typing.ArrayLike] | ||
| # ) -> dict[str, np.typing.ArrayLike]: | ||
| # return {} | ||
|
|
||
| # def abstract_eval(abstract_inputs): | ||
| # return {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # Tesseract configuration file | ||
| # Generated by tesseract 0.8.2.dev14+g494ed54.d20250401 on 2025-04-04T18:55:51.909676 | ||
|
|
||
| name: "cuda-image" | ||
| version: "0+unknown" | ||
| description: "" | ||
|
|
||
| build_config: | ||
| # Base image to use for the container, must be Ubuntu or Debian-based | ||
| base_image: "nvidia/cuda:12.8.1-runtime-ubuntu24.04" | ||
|
|
||
| # Platform to build the container for. In general, images can only be executed | ||
| # on the platform they were built for. | ||
| target_platform: "native" | ||
|
|
||
| # Additional packages to install in the container (via apt-get) | ||
| # extra_packages: | ||
| # - package_name | ||
|
|
||
| # Data to copy into the container, relative to the project root | ||
| # package_data: | ||
| # - [path/to/source, path/to/destination] | ||
|
|
||
| # Additional Dockerfile commands to run during the build process | ||
| # custom_build_steps: | ||
| # - | | ||
| # RUN echo "Hello, World!" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # Tesseract requirements file | ||
| # Generated by tesseract 0.8.2.dev14+g494ed54.d20250401 on 2025-04-04T18:55:51.909676 | ||
|
|
||
| # Add Python requirements like this: | ||
| # numpy==1.18.1 | ||
|
|
||
| # This may contain private dependencies via SSH URLs: | ||
| # git+ssh://[email protected]/username/repo.git@branch | ||
| # (use `tesseract build --forward-ssh-agent` to grant the builder access to your SSH keys) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.