Fix Dockerfile.gpu: COPY sources before install_deps.sh - #272
Open
haas-ac wants to merge 1 commit into
Open
Conversation
install_deps.sh and node.sh are in the NodeODM tree, so they must be copied before the RUN that invokes them. npm also comes from nvm, so node --powercycle has to stay in the same RUN as install_deps.sh.
maurerle
approved these changes
Aug 19, 2026
maurerle
left a comment
There was a problem hiding this comment.
This harmonizes the dockerfile.gpu with the other Dockerfile and reduces the unique changes 😊
| @@ -1,31 +1,32 @@ | |||
| FROM opendronemap/odm:gpu | |||
| ARG FROM_REPO=opendronemap/odm:gpu | |||
| FROM ${FROM_REPO} | |||
There was a problem hiding this comment.
This is useful when cross checking other states of the underlying ODM image.
Similar as here: https://github.com/WebODM/NodeODX/blob/a480583ff8a4d7aaa23f890433b78727ebe750d0/Dockerfile.gpu#L1-L2
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Dockerfile.gpucurrently runsinstall_deps.shandln -s /var/www/node.shbeforeCOPY. Both files live in this repository, so a GPU image build from source fails (install_deps.sh: No such file or directory).A later
RUN npm install --productionalso fails (npm: not found) because Node/npm come from nvm insideinstall_deps.shand are not onPATHin a new layer.The CPU
Dockerfilealready does this correctly:COPYfirst, theninstall_deps.shandnode --powercyclein the sameRUN.Change
/var/wwwbefore installing depsinstall_deps.sh, tool symlinks, andnode index.js --powercyclein oneRUN(install_deps.shalready runsnpm install --production)ldconfigstep and theodmuserARG FROM_REPO=opendronemap/odm:gpuso a custom ODM GPU image can be used with--build-arg FROM_REPO=…Test
PR CI only builds the CPU
Dockerfile, notDockerfile.gpu.Built locally with a custom ODM GPU base:
Container starts and /info responds.
Notes
This is a small bugfix (NodeODM README: PR directly). I used an AI coding assistant to help draft the reorder; the failure mode and the intended order come from GPU builds against current master.