-
Notifications
You must be signed in to change notification settings - Fork 332
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
Dockerize FBX2glTF #184
Dockerize FBX2glTF #184
Conversation
Many thanks for this work! Apologies for the simplistic question, though –– can you walk me through what Dockerising accomplishes in this case? The statically linked, precompiled binaries are meant to be pretty reliably executable in most environments. Are you sure 'git lfs' can't fairly easily be installed in these managed environments? I'm a little concerned that there may be some confusing legal distinction between fetching and auto-installing SDKs from Autodesk, compared to a Git LFS fetch. Autodesk's license is not super clear (at least to me.) |
pip install conan && \ | ||
conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan | ||
|
||
COPY . /fbx2gltf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this COPY be easily made to skip "./sdk/" by any chance? That's a lot of pointless data, if you're sure GIT LFS is not reliable everywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should be able to add that to .dockerignore
. The large copy wouldn't be an issue for docker hub builds because git lfs files haven't been pulled, but I can see this as useful for local builds.
@zellski no problem on the pull request! Also, those are all totally fair questions, I could be convinced the Dockerfile isn't work adding. Here's my thinking though. There are two main reasons I see for adding it.
Regarding git lfs and the fbx license. I feel confident that git lfs doesn't work on docker hub or google cloud build. Here is a build from docker hub demonstrating the problem and an issue requesting support. I can't speak to the legality of this approach. It feels to me that coping the binary and redistributing it via git lfs is equivalent to what's done in the Dockerfile, but I really don't know. |
As long as we know precisely what we're running, there's no need to trust in Conan's guesswork. (This also uses 'docker-build' for a build directory, to reduce risk of conflict with the local repo checkout.)
Yeah, after a day or two of playing around with this, I remember now all the ways in which Docker helps. I committed a "fix" to the segfault problem on master here, and pushed a PR to your PR with the necessary tweak to Dockerfile. If you can integrate that here, I think we're good to go. |
Great, I’ll get that integrated tonight or tomorrow. |
The Dockerfile can tell Conan exactly what its system is.
Thanks a lot! |
I think it may have been premature to merge this. The last change to the dockerfile failed to build on docker hub. I'm looking into and will get back to you. |
That's odd. The compiler settings should be guaranteed identical, given Docker magic, no? Ah well. Just do a follow-up PR. I wish I were someone who kept a tidy source control history, but it's... not my strength. |
Yeah . . . not exactly sure what happened on that build. I suspect that the difference between local testing you did and the remote, was that your local ADD would have add sdk files pulled.
I'm adding the sdk to |
This pull request dockerizes FBX2glTF and is based on the azure build file. I've included a simple
docker-compose.yaml
because I find its syntax more convenient. A few notesdocker-compose build
.docker-compose run fbx2gltf bash
.FBX2glTF
is on the PATH, so it can be executed from anywhere.I am still finding that the latest build segfaults, but that appears to match the current build on azure. Related #183