summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Dockerfile29
1 files changed, 29 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..0eef3f9
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,29 @@
+# Since USD takes so long to build, we separate it into it's own container
+FROM navanchauhan/usd:latest
+
+WORKDIR /usr/src/ufg
+
+# Configuration
+ARG UFG_RELEASE="3bf441e0eb5b6cfbe487bbf1e2b42b7447c43d02"
+ARG UFG_SRC="/usr/src/ufg"
+ARG UFG_INSTALL="/usr/local/ufg"
+ENV USD_DIR="/usr/local/usd"
+ENV LD_LIBRARY_PATH="${USD_DIR}/lib:${UFG_SRC}/lib"
+ENV PATH="${PATH}:${UFG_INSTALL}/bin"
+ENV PYTHONPATH="${PYTHONPATH}:${UFG_INSTALL}/python"
+
+# Build + install usd_from_gltf
+RUN git init && \
+ git remote add origin https://github.com/google/usd_from_gltf.git && \
+ git fetch --depth 1 origin "${UFG_RELEASE}" && \
+ git checkout FETCH_HEAD && \
+ python "${UFG_SRC}/tools/ufginstall/ufginstall.py" -v "${UFG_INSTALL}" "${USD_DIR}" && \
+ cp -r "${UFG_SRC}/tools/ufgbatch" "${UFG_INSTALL}/python" && \
+ rm -rf "${UFG_SRC}" "${UFG_INSTALL}/build" "${UFG_INSTALL}/src"
+
+RUN mkdir /usr/app
+WORKDIR /usr/app
+
+# Start the service
+ENTRYPOINT ["usd_from_gltf"]
+CMD ["usd_from_gltf"] \ No newline at end of file