kopia lustrzana https://github.com/OpenDroneMap/NodeODM
Add run script that sets the render group and runs as user odm.
rodzic
f70f3aa7fa
commit
3ce397c5b8
|
@ -29,6 +29,5 @@ RUN usermod -aG video,users odm
|
|||
RUN usermod -aG video,users,odm root
|
||||
|
||||
WORKDIR /var/www
|
||||
USER odm
|
||||
|
||||
ENTRYPOINT ["/usr/bin/node", "/var/www/index.js"]
|
||||
ENTRYPOINT ["/var/www/run_gpu_intel.sh"]
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
FROM opendronemap/nodeodm:gpu.intel
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
ARG RENDER_GROUP_ID=0
|
||||
|
||||
USER root
|
||||
|
||||
RUN if [ "${RENDER_GROUP_ID}" -ne 0 ]; then groupadd -g "${RENDER_GROUP_ID}" render; usermod -aG render odm; fi
|
||||
|
||||
WORKDIR /var/www
|
||||
USER odm
|
||||
|
||||
ENTRYPOINT ["/usr/bin/node", "/var/www/index.js"]
|
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [ "${RENDER_GROUP_ID}" -ne 0 ]; then
|
||||
groupadd -g "${RENDER_GROUP_ID}" render
|
||||
usermod -aG render odm
|
||||
fi
|
||||
|
||||
su - odm -c "/usr/bin/node /var/www/index.js $@"
|
Ładowanie…
Reference in New Issue