Boris2 in Docker
timvgl opened this issue · comments
Hello together,
currently, I am trying to make Boris2 run in a docker container, since it is supposed to be used in a simulation plattform that automatizes simulations and the analysis.
The issue I am facing is that Boris2 seems to not compile correctly?
On a system using a GPU that has an Ampere architecture Boris is compiled in docker with the arch setting being 80.
Afterwards, Boris starts successfully.
If I use a different setup, with a GPU that has a Volta or Turing architecture and using arch=70 the container is build successfully, without errors. Same concerning the compiling process of Boris.
Unfortunately, Boris2 will not start in this configuration, if docker is forwarding GPUs. There is no error message.
If Boris2 is started without forwarding GPUs to the container, Boris2 starts.
Here is the docker file I am using:
FROM nvidia/cuda:11.4.3-devel-ubuntu20.04
WORKDIR /app
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ="Europe/Berlin"
RUN apt-get update
RUN apt-get install build-essential -y
RUN apt-get install libomp-dev -y
RUN apt-get install libtbb-dev -y
RUN apt-get install wget -y
RUN apt-get install libx11-dev -y
RUN apt-get install nano
RUN apt-get install python3.8-dev -y
RUN apt-get install python3-pip -y
RUN apt-get install git -y
RUN python3.8 -m pip install --upgrade pip
RUN pip3 install matplotlib numpy notebook
RUN wget www.fftw.org/fftw-3.3.10.tar.gz
RUN tar -xzf fftw-3.3.10.tar.gz
RUN cd fftw-3.3.10
RUN chmod +x fftw-3.3.10/configure
RUN bash fftw-3.3.10/configure
RUN make
RUN make install
RUN git clone https://github.com/SerbanL/Boris2.git /Boris2
RUN cd /Boris2
RUN make -C /Boris2 configure arch=70 sprec=1 python=3.8 cuda=11.4
RUN make -C /Boris2 compile -j 30
RUN make -C /Boris2 install
RUN chmod ugo+rwx /Boris2/BorisLin
RUN cp -r /Boris2/BorisPythonScripts/* /Boris2/
WORKDIR /Boris2/BorisPythonScripts
ENV PATH=${PATH}:/Boris2/BorisLin
RUN cp -r /Boris2/src/NetSocks /usr/lib/python3.8/
Thank you for your help
Yours faithfully
Tim Vogel
Hi Tim,
Unfortunately I don't have any experience with docker so it's hard to say exactly what the problem is.
I know that if the build arch setting doesn't match the GPU detected in general it cannot be guaranteed the program will start, so it sounds like a problem with GPU forwarding.
Kind regards,
Serban
Hi Serban,
jep it has been an issue with the forwarding since different GPUs are used in the same system - so different architectures.
Thanks for your help!
Kind regards,
Tim