Merge pull request #170 from airmap/bkd/gpu

Add Intel Dockerfile and run as odm user.
pull/171/head
Piero Toffanin 2021-10-05 15:24:54 -04:00 zatwierdzone przez GitHub
commit 7d9d26a3d8
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 44 dodań i 2 usunięć

Wyświetl plik

@ -4,7 +4,7 @@ MAINTAINER Piero Toffanin <pt@masseranolabs.com>
EXPOSE 3000
USER root
RUN apt-get update && apt-get install -y curl gpg-agent
RUN apt-get update && apt-get install -y curl gpg-agent ca-certificates
RUN curl --silent --location https://deb.nodesource.com/setup_10.x | bash -
RUN apt-get install -y nodejs unzip p7zip-full && npm install -g nodemon && \
ln -s /code/SuperBuild/install/bin/untwine /usr/bin/untwine && \
@ -15,8 +15,13 @@ RUN apt-get install -y nodejs unzip p7zip-full && npm install -g nodemon && \
RUN mkdir /var/www
WORKDIR "/var/www"
COPY . /var/www
RUN useradd -m -d "/home/odm" -s /bin/bash odm
COPY --chown=odm:odm . /var/www
RUN npm install && mkdir -p tmp
RUN chown -R odm:odm /var/www
USER odm
ENTRYPOINT ["/usr/bin/node", "/var/www/index.js"]

Wyświetl plik

@ -0,0 +1,37 @@
FROM opendronemap/nodeodm:gpu
EXPOSE 3000
ARG RENDER_GROUP_ID=0
USER root
RUN apt-get remove --purge -y intel-opencl-icd && \
apt-get autoremove -y
RUN mkdir /tmp/opencl
WORKDIR /tmp/opencl
RUN apt-get update && \
apt-get install -y --no-install-recommends ocl-icd-libopencl1 wget && \
rm -rf /var/lib/apt/lists/* && \
wget https://github.com/intel/compute-runtime/releases/download/21.38.21026/intel-gmmlib_21.2.1_amd64.deb && \
wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.8708/intel-igc-core_1.0.8708_amd64.deb && \
wget https://github.com/intel/intel-graphics-compiler/releases/download/igc-1.0.8708/intel-igc-opencl_1.0.8708_amd64.deb && \
wget https://github.com/intel/compute-runtime/releases/download/21.38.21026/intel-opencl_21.38.21026_amd64.deb && \
wget https://github.com/intel/compute-runtime/releases/download/21.38.21026/intel-ocloc_21.38.21026_amd64.deb && \
wget https://github.com/intel/compute-runtime/releases/download/21.38.21026/intel-level-zero-gpu_1.2.21026_amd64.deb && \
dpkg -i /tmp/opencl/*.deb && \
ldconfig && \
rm -Rf /tmp/opencl
RUN apt-get update && \
apt-get install -y --no-install-recommends clinfo
RUN usermod -aG video,users odm
RUN usermod -aG video,users,odm 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"]