Skip to content

Commit

Permalink
[EXPR-2]run as root
Browse files Browse the repository at this point in the history
  • Loading branch information
sudheerad9 committed Jul 24, 2021
1 parent 60bfb3c commit 92ace84
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ WORKDIR /app
RUN useradd --create-home --home-dir /home/docker --shell /bin/bash docker
RUN usermod -a -G sudo docker
RUN echo "docker ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
COPY o.tar.bz2 /app
RUN wget http://www.open-mpi.org/software/ompi/v4.1/downloads/openmpi-4.1.1.tar.gz
RUN tar xzvf openmpi-4.1.1.tar.gz
WORKDIR openmpi-4.1.1
Expand Down
4 changes: 2 additions & 2 deletions SirIsaac/fittingProblem.py
Original file line number Diff line number Diff line change
Expand Up @@ -1807,7 +1807,7 @@ def localFitToData_parallel(self,numprocs,fittingData,dataModel,

# call mpi
stdoutFile = open(prefix+"stdout.txt",'w')
subprocess.call([ "mpirun","-np",str(numprocs),"python",
subprocess.call([ "mpirun","-np","--allow-run-as-root",str(numprocs),"python",
os.path.join(SIRISAACDIR, "localFitParallel.py"),
inputDictFilename ],
stderr=stdoutFile,stdout=stdoutFile,env=os.environ)
Expand Down Expand Up @@ -2630,7 +2630,7 @@ def generateEnsemble_parallel(self,numprocs,dataModel,initialParameters,
# https://stackoverflow.com/questions/60060142/strange-interaction-
# between-h5py-subprocess-and-mpirun
stdoutFile = open(prefix+"stdout.txt",'w')
subprocess.call([ "mpirun","-np",str(numprocs),"python",
subprocess.call([ "mpirun","-np","--allow-run-as-root",str(numprocs),"python",
os.path.join(SIRISAACDIR, "generateEnsembleParallel.py"),
inputDictFilename ],
stderr=stdoutFile,stdout=stdoutFile,env=os.environ)
Expand Down

0 comments on commit 92ace84

Please sign in to comment.