From 70cca3b2e7d45516b369bcc3d056093333dd62d9 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Mon, 31 Aug 2020 11:14:25 +0530 Subject: added dockerfile --- Dockerfile | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Dockerfile (limited to 'Dockerfile') 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 -- cgit v1.2.3