Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A docker file and some instructions #450

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
FROM ubuntu:focal

ENV DEBIAN_FRONTEND noninteractive

ARG USER_ID
ARG GROUP_ID
RUN addgroup --gid $GROUP_ID flownet
RUN adduser --disabled-password --gecos '' --uid $USER_ID --gid $GROUP_ID flownet

RUN apt update && \
apt install -y --no-install-recommends software-properties-common && \
apt-add-repository ppa:opm/ppa -y && \
apt-get update && \
apt install -y --no-install-recommends \
mpi-default-bin \
libopm-simulators-bin \
zlib1g-dev \
libblas-dev liblapack-dev \
libgl1 \
git \
python3-pip \
python3-setuptools \
python3-sphinx \
python3-sphinx-rtd-theme \
make \
python3-ipython \
python3-ipdb \
black \
pylint \
libxrender1 \
python3-pytest \
libnss3-tools && \
apt-get -y install -o Dpkg::Options::="--force-confold" sudo && \
apt-get clean && rm -rf /var/lib/apt/lists/*

RUN adduser flownet sudo && \
echo "flownet:docker" | chpasswd && \
echo "flownet ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

USER flownet

RUN echo "export PATH=$PATH:~/.local/bin" >> ~/.bashrc
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@ run jobs via LSF correctly you will need to update your default shell's
configuration file (`.cshrc` or `.bashrc`) to automatically source your
virtual environment.

It is also possible to use the provided docker file as
```bash
git clone [email protected]:equinor/flownet.git
docker build --tag=flownet-image --build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) --file=flownet/Dockerfile .
docker run -ti --mount "type=bind,src=$(pwd),dst=/home/flownet/shared" --workdir="/home/flownet/shared" flownet-image
```
In the docker container, install flownet as above by
```bash
cd flownet
pip install -e .
```

### Running FlowNet

You can run _FlowNet_ as a single command line:
Expand Down