Commit 2e750d39 authored by Lukas Riedel's avatar Lukas Riedel

Merge branch 'update/dune-v2.5.1' into 'master'

switch to Python 3, install modules in editable mode

Closes #31

See merge request !16
parents 9316147c 6a6bcba3
FROM dorie/dune-env:2.5
FROM dorie/dune-env:2.5.1
MAINTAINER Dion Häfner
WORKDIR /opt/dune
ADD . /opt/dune/dorie/
RUN source /opt/dune/venv/dorie/bin/activate && ./dune-common/bin/dunecontrol --only=dorie all
RUN CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Release -DDUNE_PYTHON_VIRTUALENV_SETUP=True -DDUNE_PYTHON_ALLOW_GET_PIP=True" ./dune-common/bin/dunecontrol --only=dorie all
ENV PATH="/opt/dune/dorie/build-cmake/bin:${PATH}"
WORKDIR /sim
ENTRYPOINT ["/opt/dune/dorie/build-cmake/bin/dorie"]
\ No newline at end of file
......@@ -34,9 +34,9 @@ In the section 'Usage' you will find a list of possible commands. Note that inpu
## Docker Installation - Interactive Setup
This setup is intended for advanced users. You will gain access to the DORiE module outside the container, and be able to make changes to the source code.
We have prepared a [DORiE DUNE Environment Image on Dockerhub](https://hub.docker.com/r/dorie/dune-env/), which is a modified image of the Ubuntu OS that has all dependencies readily installed. The current version is 2.5 (referencing the DUNE module version 2.5). We will run a new container from this image and mount some local directory `<hostdir>/dorie` into it by calling
We have prepared a [DORiE DUNE Environment Image on Dockerhub](https://hub.docker.com/r/dorie/dune-env/), which is a modified image of the Ubuntu OS that has all dependencies readily installed. The current version is 2.5.1 (referencing the DUNE module version 2.5). We will run a new container from this image and mount some local directory `<hostdir>/dorie` into it by calling
docker run -v <hostdir>/dorie:/opt/dune/dorie -i -t dorie/dune-env:2.5 /bin/bash
docker run -v <hostdir>/dorie:/opt/dune/dorie -i -t dorie/dune-env:2.5.1 /bin/bash
Docker will automatically download the image if necessary. Now you can access the content of the (still empty) folder of the virtual machine from your local `<hostdir>/dorie` directory. *Mounting directories is not possible after your container has been started!*
......
#!/usr/bin/env python
#!/usr/bin/env python3
import os
import sys
......
# install the following modules in editable mode: 'pip -e'
set(DUNE_PYTHON_INSTALL_EDITABLE TRUE)
# install required python modules
dune_python_install_package(PATH utilities)
dune_python_install_package(PATH parscraper)
......
......@@ -2,6 +2,11 @@ import os
import h5py
import numpy as np
try: # Python 2.x compatibility
input = raw_input
except NameError:
pass
def read_parameter_file(in_path):
data_dict = {}
with h5py.File(in_path, 'r') as f:
......@@ -32,7 +37,7 @@ def write_parameter_file(group,data_dict,out_path,attrs=None,overwrite=False):
"""
if os.path.isfile(out_path) and not overwrite:
ow = raw_input("The output file {} already exists. Overwrite? [y/N] ".format(out_path))
ow = input("The output file {} already exists. Overwrite? [y/N] ".format(out_path))
if not ow.lower() in ["y","yes"]:
raise RuntimeError("Aborting")
......
#!/usr/bin/env python
#!/usr/bin/env python3
import sys
from setuptools import setup
......
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import absolute_import
......
#!/usr/bin/env python
#!/usr/bin/env python3
import sys
from setuptools import setup
......
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import absolute_import
......
#!/usr/bin/env python
#!/usr/bin/env python3
import sys
from setuptools import setup
......
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import absolute_import
......
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
......
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import absolute_import
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment