Skip to content

Instantly share code, notes, and snippets.

@pammacdotnet
Created September 17, 2019 08:51
Show Gist options
  • Save pammacdotnet/672b9dea47ea4a8b6f458177eee58737 to your computer and use it in GitHub Desktop.
Save pammacdotnet/672b9dea47ea4a8b6f458177eee58737 to your computer and use it in GitHub Desktop.
FROM ubuntu:18.04
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y subversion build-essential cmake python3-dev wget zlib1g-dev ruby-dev \
swig libglew-dev xorg-dev libx11-dev xorg-dev fftw3-dev python3-pip libassimp-dev \
python3-tk xvfb octave-pkg-dev octave-image less libglfw3-dev
RUN apt-get install --fix-missing
RUN pip3 install numpy matplotlib image pillow
ENV PYTHON /usr/bin/python3
RUN gem install matplotlib
WORKDIR /root
ADD gvxrsource.tgz /root/
RUN ls /root/gvirtualxray-trunk
#RUN svn checkout --non-interactive --trust-server-cert https://svn.code.sf.net/p/gvirtualxray/code/trunk gvirtualxray-trunk
RUN mkdir GVXRbuild
RUN mkdir GVXR
COPY XCOM /root/GVXR/XCOM
WORKDIR /root/GVXRbuild
RUN cmake ../gvirtualxray-trunk -DBUILD_PYTHON3=ON -DBUILD_RUBY=ON \
-DUSE_SYSTEM_XCOM=ON -DXCOM_PATH=/root/GVXR/XCOM -DUSE_SYSTEM_ASSIMP=ON -DBUILD_OCTAVE=ON \
-DUSE_SYSTEM_GLFW=OFF
RUN make -j2
WORKDIR /root
RUN echo "addpath('/root/GVXR')" > /root/.octaverc
RUN cp -R /root/GVXRbuild/tools_bin/Wrappers/python3/* /root/GVXR/
RUN cp -R /root/GVXRbuild/tools_bin/Wrappers/ruby/* /root/GVXR/
RUN cp -R /root/GVXRbuild/tools_bin/Wrappers/octave/* /root/GVXR/
RUN rm -rf GVXRbuild gvirtualxray-trunk
WORKDIR /root/GVXRLab
ENV PYTHONPATH $PYTHONPATH:/root/GVXR
ENV RUBYLIB $RUBYLIB:/root/GVXR
CMD ["sh","-c","/usr/bin/xvfb-run -a /usr/bin/python3 simulacion.py ; /usr/bin/xvfb-run -a /usr/bin/ruby simulacion.rb ; /usr/bin/xvfb-run -a /usr/bin/octave simulacion.m"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment