From 0fec8bc71b96a4707f82cbcda793e1dcd9a51c67 Mon Sep 17 00:00:00 2001 From: Andrew Hatch Date: Thu, 4 Feb 2021 20:56:08 +0000 Subject: [PATCH] example docker file --- Dockerfile | 28 ++++++++++++++++++++++++++++ README.md | 18 ++++++++++++++++-- 2 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0076938 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,28 @@ +FROM ubuntu:latest + +RUN apt-get update +RUN apt-get -y install python3 python3-pip wget + +WORKDIR "/home" +ENV PATH="/home:${PATH}" +ENV FBX_SDK_ROOT=/home/fbx-sdk-linux +ENV LD_LIBRARY_PATH=$FBX_SDK_ROOT/lib/gcc4/x64/release + +RUN wget -O premake5.tar.gz https://github.com/premake/premake-core/releases/download/v5.0.0-alpha14/premake-5.0.0-alpha14-linux.tar.gz \ + && tar -xf premake5.tar.gz +RUN wget -O fbx20190_fbxsdk_linux.tar.gz http://download.autodesk.com/us/fbx/2019/2019.0/fbx20190_fbxsdk_linux.tar.gz \ + && tar -xf fbx20190_fbxsdk_linux.tar.gz \ + && chmod +x fbx20190_fbxsdk_linux \ + && mkdir fbx-sdk-linux \ + && yes yes | ./fbx20190_fbxsdk_linux fbx-sdk-linux + +COPY . /home +RUN ./generate_makefile \ + && cd build/gmake/ \ + && make config=release + +FROM ubuntu:latest +COPY --from=0 /home/build/gmake/bin/Release/fbx-conv /usr/bin/fbx-conv +COPY --from=0 /home/fbx-sdk-linux/lib/gcc4/x64/release/* /usr/lib/ +WORKDIR "/home" +ENTRYPOINT ["/usr/bin/fbx-conv"] diff --git a/README.md b/README.md index 99d0510..2dad79d 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ to generate the output. Send us a pull request if you want the writer for your engine/framework/app to be integrated. We'll build the converter for Windows, Linux and Mac. -The FBX parser is largely based on GamePlay SDK's encoder. We'll try to +The FBX parser is largely based on GamePlay SDK's encoder. We'll try to back-port any bug fixes or improvements. Hangout notes https://docs.google.com/document/d/1nz-RexbymNtA4pW1B5tXays0tjByBvO8BJSKrWeU69g/edit# @@ -54,7 +54,21 @@ There's also a [Qt GUI wrapper](https://github.com/Reydw/Fbx-Converter-GUI) and Building ======== You'll need premake and an installation of the FBX SDK 2019.0. Once installed/downloaded, set the -FBX_SDK_ROOT to the directory where you installed the FBX SDK. Then run one of the +FBX_SDK_ROOT to the directory where you installed the FBX SDK. Then run one of the generate_XXX scripts. These will generate a Visual Studio/XCode project, or a Makefile. On Linux and Mac, you can follow [Travis build steps](.travis.yml) in order to build and run it. + +Docker +====== +Why not build your own docker image: + +```bash +docker build . -t fbx-conv +``` + +Once done, run `fbx-conv` like this: + +```bash +docker run --rm -v $PWD:/home fbx-conv my-model.obj +```