Skip to content

example docker file #129

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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#
Expand Down Expand Up @@ -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
```