Skip to content

Commit

Permalink
Fix user for binding tests (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminRodenberg authored Dec 3, 2019
1 parent 96bc064 commit f9c5ac9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 5 additions & 1 deletion tests/Test_bindings.Ubuntu1804/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# System testing preCICE bindings

# Building on top of the latets preCICE-build
# Building on top of the latest preCICE-build
ARG from=precice/precice-ubuntu1804.home-develop
FROM $from

Expand All @@ -13,6 +13,8 @@ ENV FORTRAN=gfortran
RUN apt-get -qq update && apt-get -qq install \
cython3 python3-pip python3-numpy python3-mpi4py python3-setuptools python3-dev && \
rm -rf /var/lib/apt/lists/*

USER precice

# Builds the precice python bindings for python3
WORKDIR $PRECICE_ROOT/src/precice/bindings/python
Expand Down Expand Up @@ -44,4 +46,6 @@ RUN gfortran $PRECICE_ROOT/src/precice/bindings/f2003/SolverInterfaceF2003.f90 -
RUN ./solverdummy ../precice-config.xml SolverOne MeshOne & ./solverdummy ../precice-config.xml SolverTwo MeshTwo

# Creating Output folder
USER root
RUN mkdir /Output
USER precice
8 changes: 6 additions & 2 deletions tests/Test_bindings/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ RUN apt-get -qq update && apt-get -qq install \

# Installing necessary python dependecies; we have to use pip, since cython provided by apt-get is too old.
RUN wget -q https://bootstrap.pypa.io/get-pip.py -O get-pip.py && \
python3 get-pip.py && \
pip3 install Cython mpi4py numpy enum34
python3 get-pip.py

USER precice
RUN pip3 install --user cython mpi4py numpy enum34

# Builds the precice python bindings for python3
WORKDIR $PRECICE_ROOT/src/precice/bindings/python
Expand Down Expand Up @@ -49,4 +51,6 @@ RUN gfortran $PRECICE_ROOT/src/precice/bindings/f2003/SolverInterfaceF2003.f90 -
RUN ./solverdummy ../precice-config.xml SolverOne MeshOne & ./solverdummy ../precice-config.xml SolverTwo MeshTwo

# Creating Output folder
USER root
RUN mkdir /Output
USER precice

0 comments on commit f9c5ac9

Please sign in to comment.