Skip to content

Commit

Permalink
[EXPR-2]add docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
sudheerad9 committed Jul 24, 2021
1 parent 5fd198d commit 42f391a
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 4 deletions.
39 changes: 39 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
FROM ubuntu:latest
RUN apt-get update && apt-get -y update
FROM python:2
ARG DEBIAN_FRONTEND=noninteractive
RUN mkdir app
RUN apt-get update -y && \
apt-get install -y --no-install-recommends sudo apt-utils && \
apt-get install -y --no-install-recommends openssh-server \
python-dev python-numpy python-pip python-virtualenv python-scipy \
gcc gfortran libopenmpi-dev openmpi-bin openmpi-common openmpi-doc binutils && \
apt-get clean && apt-get purge && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
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
RUN ./configure --prefix=/usr/local/openmpi4.1.1
RUN make all
RUN make install
RUN MPI_DIR=/usr/local/openmpi4.1.1
ENV LD_LIBRARY_PATH="${MPI_DIR}/lib:${LD_LIBRARY_PATH}"
ENV PATH="/usr/local/openmpi4.1.1/bin:${PATH}"
RUN git clone https://github.com/mpi4py/mpi4py.git ./mpi4py.git
WORKDIR mpi4py.git
RUN python setup.py build --mpicc=/usr/local/openmpi4.1.1/bin/mpicc
RUN python setup.py install
WORKDIR /app
RUN apt-get -y update && apt -y install libopenmpi-dev

RUN pip install numpy
RUN pip install jupyter notebook
RUN git clone -b mpi4py-convesion https://github.com/diging/SloppyCell.git
RUN pip install -e SloppyCell/
RUN git clone -b pypar-check https://github.com/diging/SirIsaac.git
RUN pip install -e SirIsaac/
CMD ["jupyter", "notebook", "--port=8888", "--no-browser", "--ip=0.0.0.0", "--allow-root"]
3 changes: 1 addition & 2 deletions SirIsaac/fittingProblem.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ def fitAll(self,usePreviousParams=True,fitPerfectModel=False,resume=True,
smallerBestParams = self.smallerBestParamsDict[name]
else:
smallerBestParams = None
print("smallerbestparams",smallerBestParams)
# 8.30.2012 get fittingDataDerivs if I have them
fittingDataDerivs = getattr(self,'fittingDataDerivs',None)
# 9.20.2012 XXX Should we never include priors for cost?
Expand Down Expand Up @@ -2626,7 +2625,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),"--allow-run-as-root","python",
subprocess.call([ "mpirun", "-np",str(numprocs),"python",
os.path.join(SIRISAACDIR, "generateEnsembleParallel.py"),
inputDictFilename],
stderr=stdoutFile,stdout=stdoutFile,env=os.environ)
Expand Down
3 changes: 1 addition & 2 deletions test/test_fitting_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,4 @@ def test_fitting_problem_init(self):
ftest = FittingProblem(datatest,modellisttest,
indepParamsList=indepParamsList)

self.assertEqual(None, ftest.getBestModel())
{"mode":"full","isActive":false}
self.assertEqual(None, ftest.getBestModel())

0 comments on commit 42f391a

Please sign in to comment.