Spaces:
Runtime error
Runtime error
# build frontend viewer with node | |
FROM node:19 as viewer-frontend | |
WORKDIR /app | |
RUN git clone -b radames-patch-1 https://github.com/radames/nerfstudio . | |
RUN npm install --global yarn --force | |
RUN cd nerfstudio/viewer/app && \ | |
yarn install && \ | |
yarn build | |
# install nerfstudio | |
FROM dromni/nerfstudio:0.3.2 | |
USER root | |
RUN apt-get -y update && apt-get -y install nginx | |
RUN mkdir -p /var/cache/nginx \ | |
/var/log/nginx \ | |
/var/lib/nginx | |
RUN touch /var/run/nginx.pid | |
RUN chown -R 1000:1000 /var/cache/nginx \ | |
/var/log/nginx \ | |
/var/lib/nginx \ | |
/var/run/nginx.pid | |
# copy frontend static to nginx server | |
COPY nginx.conf /etc/nginx/sites-available/default | |
COPY --from=viewer-frontend /app/nerfstudio/viewer/app/build /usr/share/nginx/html | |
EXPOSE 8080 | |
USER 1000 | |
# nerfstudio commands here | |
RUN ["ns-download-data", "nerfstudio", "--capture-name=bww_entrance"] | |
# nerfstudio training with nginx to server the viewer | |
CMD ["/bin/sh", "-c","ns-train nerfacto --data data/nerfstudio/bww_entrance & nginx -g 'daemon off;'"] |