Skip to content
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

Update blender version on sample Dockerfile #1259

Merged

Conversation

n-jay
Copy link
Contributor

@n-jay n-jay commented Feb 8, 2023

Link the Issue(s) this Pull Request is related to.
PR related email thread linked here.

Summarize your change.
Updates the Blender version in sample Dockerfile to latest LTS release: v3.3

This change was made to complement the upcoming OpenCue Blender addon. Related discussion: #312

n-jay added 2 commits February 8, 2023 16:08
Update comments with version number
Move directories
Remove version details from comment
Add Blender install verification command
@n-jay
Copy link
Contributor Author

n-jay commented Feb 10, 2023

@bcipriano something I noticed and wanted to clarify before merging.
Should /usr/local/blender be set as the WORKDIR?

@bcipriano
Copy link
Collaborator

@n-jay It's kind of a matter of preference. I don't think it's strictly necessary here, but you could use it if you want.

If there are a lot of other Dockerfile instructions that need to run within that directory, it does help keep the Dockerfile simple. On the other hand, in a standard build-and-install process, if you set your WORKDIR to the install directory, you can end up with some unneeded build artifacts in the install directory, which can make things messy for future users.

An alternative in this case could be to use ARG to set the path as a variable:

ARG BLENDER_INSTALL_DIR=/usr/local/blender
...
RUN mkdir "${BLENDER_INSTALL_DIR}"
<and so on>

This would reduce repetition, make it easy to change the directory in the future (you only have to update one line instead of several), and lets users override it with a custom value at build time via --build-arg.

https://docs.docker.com/engine/reference/builder/#arg

@n-jay
Copy link
Contributor Author

n-jay commented Feb 10, 2023

If there are a lot of other Dockerfile instructions that need to run within that directory, it does help keep the Dockerfile simple. On the other hand, in a standard build-and-install process, if you set your WORKDIR to the install directory, you can end up with some unneeded build artifacts in the install directory, which can make things messy for future users.

Noted,
I went ahead with the ARG alternative you suggested, thanks for that!

Copy link
Collaborator

@bcipriano bcipriano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM

@bcipriano bcipriano merged commit a22391f into AcademySoftwareFoundation:master Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants