-
Notifications
You must be signed in to change notification settings - Fork 97
feat(screenshot): Add tiled rendering to support very large screenshots (#581) #738
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
16 commits
Select commit
Hold shift + click to select a range
67d522d
feat: add tiled screenshot rendering to support very large images (#581)
deveshbervar e06a9c2
fix: safe camera view offset calls
deveshbervar 6d7a5f0
fix(make-picture): remove outdated size check for tiled screenshots
deveshbervar c9ee693
fix: remove checkSize and disabled logic as requested
deveshbervar cc8b764
fix: restore crop/stretch logic + integrate tiling safely
deveshbervar 5a1662c
fix: correct Stretch screenshot aspect ratio & restore camera aspect
deveshbervar 5eddf2d
fix: restore stretch aspect logic + safe TS guards
deveshbervar 1b836b3
fix: correct stretch rendering logic, remove crop offsets, proper vie…
deveshbervar 4a6d799
fix: initialize callback functions + update Docker install step to fi…
deveshbervar 247b909
fix: resolve Dockerfile conflict and enable native build for lmdb
deveshbervar 5b0c2b1
Merge branch 'main' into screenshot-tiling-fix
EdwardMoyse e86b35d
fix: initialize callbacks + update Dockerfile base image to fix CI
deveshbervar 0c41d48
fix: restore callback typings + initialize defaults + replace python …
deveshbervar 07e9fc1
fix: correct viewOffset typing to resolve TS2349 error
deveshbervar 82e5612
fix: python install and node-gyp python3 path for CI
deveshbervar 56317f2
fix: remove unsupported --verbose flag from yarn install
deveshbervar 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,32 +1,62 @@ | ||
| FROM nvidia/opengl:1.0-glvnd-devel-ubuntu20.04 AS build | ||
| FROM nvidia/opengl:1.0-glvnd-devel-ubuntu22.04 AS build | ||
|
|
||
| # 1. System dependencies needed by native Node modules (canvas, headless-gl) | ||
| RUN apt-get update -y | ||
| RUN apt-get install -y curl gnupg ca-certificates && \ | ||
| curl -sL https://deb.nodesource.com/setup_18.x | bash - && \ | ||
| apt-get install -y nodejs | ||
| RUN apt-get install -y build-essential python libxi-dev libglu-dev libglew-dev pkg-config git | ||
| # 0. Set frontend to noninteractive to suppress warnings during install | ||
| ARG DEBIAN_FRONTEND=noninteractive | ||
| RUN apt-get install -y libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev | ||
|
|
||
| # 2. Project workspace | ||
| # 1. System dependencies & Python Fix | ||
| # We combine everything into ONE Run command to keep the image small and avoid errors. | ||
| RUN apt-get update -y && \ | ||
| # Install prerequisites for Node setup | ||
| apt-get install -y --no-install-recommends curl gnupg ca-certificates && \ | ||
| # Setup Node 18 repository | ||
| curl -sL https://deb.nodesource.com/setup_18.x | bash - && \ | ||
| # Install Node, Python 3, Build Tools, and Canvas dependencies | ||
| apt-get install -y --no-install-recommends \ | ||
| nodejs \ | ||
| build-essential \ | ||
| python3 \ | ||
| python3-dev \ | ||
| python-is-python3 \ | ||
| libxi-dev \ | ||
| libglu-dev \ | ||
| libglew-dev \ | ||
| pkg-config \ | ||
| git \ | ||
| libcairo2-dev \ | ||
| libpango1.0-dev \ | ||
| libjpeg-dev \ | ||
| libgif-dev \ | ||
| librsvg2-dev && \ | ||
| # Clean up apt lists to save space (Must be done at the very end!) | ||
| rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # 2. Build Phoenix | ||
| WORKDIR /phoenix | ||
| COPY . . | ||
|
|
||
| # 3. Environment: mark CI + skip Cypress binary (we only build static docs here) | ||
| # Enable Corepack | ||
| RUN corepack enable | ||
|
|
||
| # Force native modules (lmdb) to build from source | ||
| ENV npm_config_build_from_source=true | ||
|
|
||
| # *** IMPORTANT FIX *** | ||
| # Tell node-gyp explicitly to use the python3 executable we just installed | ||
| ENV npm_config_python=/usr/bin/python3 | ||
|
|
||
| # CI environment variables | ||
| ENV CI=1 | ||
| ENV CYPRESS_INSTALL_BINARY=0 | ||
|
|
||
| # 4. Use Yarn via Corepack (honors yarnPath -> Yarn 3 committed in repo) | ||
| RUN corepack enable | ||
|
|
||
| # 5. Install dependencies & build the web/docs | ||
| # Install dependencies (verbose so you can see if python errors occur) | ||
| RUN yarn install --silent | ||
|
|
||
| # Build the web app | ||
| RUN yarn deploy:web | ||
|
|
||
| # 6. Remove node_modules to keep final image lean | ||
| # Remove node_modules folders to save space | ||
| RUN find . -name "node_modules" -type d -exec rm -rf "{}" + | ||
|
|
||
| # 7. Runtime stage: just serve the built docs | ||
| # 3. Serve the build through NGINX | ||
| FROM nginx:alpine | ||
| COPY --from=build /phoenix/packages/phoenix-ng/docs /usr/share/nginx/html |
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
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.