google / usd_from_gltf

Apache License 2.0
550 stars 86 forks source link

Heroku build pack with this? #50

Open ghost opened 4 years ago

ghost commented 4 years ago

Is there an Heroku build pack that would allow us to use this on Heroku directly?

alankalb commented 3 years ago

A little late to this. It is difficult to make a Heroku buildpack for this since the build of USD would most likely cause a timeout. A better option is to build on Heroku with a Dockerfile. I have created a Dockerfile that uses the herokuish Dockerfile as a base to build USD and usd_from_gltf.

https://github.com/alankalb/herokuish-usd/blob/main/Dockerfile

You can then include a reference to this Dockerfile in your own Dockerfile and include a heroku.yml file for your Heroku build:

Dockerfile:

FROM alankalb/herokuish-usd:heroku20-usd21.02-ufg-quant
WORKDIR /app
COPY . /app
RUN curl "https://github.com/gliderlabs/herokuish/releases/download/v0.5.24/herokuish_0.5.24_linux_x86_64.tgz" \
    --silent -L | tar -xzC /bin
RUN /bin/herokuish buildpack build

heroku.yml:

build:
  docker:
    web: Dockerfile
run:
  web: bundle exec rails server

More information on using Dockerfiles with Heroku: https://devcenter.heroku.com/categories/deploying-with-docker

Note: I have my own fork of usd_from_gltf that I use for my Dockerfile. All it does is add compatibility for gltf files with the KHR_mesh_quantization extension.