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

Added Docker file #32

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
33 changes: 33 additions & 0 deletions docker/DockerUsage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Genius TCAD Docker Usage

Genius-TCAD uses a number of old versions of libraries, this makes it increasingly difficult to compile and run on the latest Linux distributions. To work around this a Docker image of an older Ubuntu 14.04 distribution is used.

## Installation

### Docker Installation

Search for instructions on how to install Docker on your distribution.

### Container Installation

To install the Docker container navigate to the folder containing this document and execute the following command:

./build.sh

The software will be automatically downloaded and installed - this will take some time.


## Usage

To interact with the installed container execute the following command:

./bash.sh

Which will allow you to navigate and execute software within the container.

To move files to and from the container use the Docker command (from a host terminal):

docker cp INST_NAME:/container/file/location /host/file/location

Use the ``docker ps`` to file the instance name of running containers.

61 changes: 61 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
FROM ubuntu:14.04

### Install prerequistes
RUN apt update --fix-missing
RUN apt update && apt upgrade -y && apt install -y build-essential cmake gfortran git flex bison \
wget curl python python-sip-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev hdf5-tools linux-headers-generic \
libvtk5-dev libvtk5-qt4-dev python-vtk tcl-vtk lvtk-dev lvtk-tools vtkdata libhdf5-dev


### Install PETSC
RUN wget http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.5.4.tar.gz
RUN tar -xvf petsc-3.5.4.tar.gz
WORKDIR petsc-3.5.4
RUN ./configure --with-mpi=0 \
--with-debugging=0 --with-shared-libraries=0 --with-x=0 --with-pic=1 \
--download-f2cblaslapack=1 \
--download-metis=1 \
--download-superlu=1 \
--COPTFLAGS="-O2" --CXXOPTFLAGS="-O2" --FOPTFLAGS="-O2"
RUN make


### Install CGNS
WORKDIR /
RUN curl -O -J -L https://sourceforge.net/projects/cgns/files/cgnslib_2.5/Release%205/cgnslib_2.5-5.tar.gz/download
RUN tar -xvf cgnslib_2.5-5.tar.gz
WORKDIR cgnslib_2.5
RUN chmod +x configure
RUN ./configure --enable-shared
RUN make && make install


### Install Genius
WORKDIR /
RUN git clone https://github.com/cogenda/Genius-TCAD-Open.git
WORKDIR Genius-TCAD-Open

RUN echo "--- wscript.orig 2020-04-18 19:02:15.583526950 +0000" >> lib.patch
RUN echo "+++ wscript 2020-04-18 19:06:15.895709943 +0000" > lib.patch
RUN echo "@@ -805,7 +805,7 @@" >> lib.patch
RUN echo " def config_vtk():" >> lib.patch
RUN echo " libs = '''vtkRendering vtkGraphics vtkImaging vtkIO vtkFiltering" >> lib.patch
RUN echo "- vtkCommon vtksys vtkDICOMParser vtkpng vtktiff vtkzlib" >> lib.patch
RUN echo "+ vtkCommon vtksys vtkDICOMParser" >> lib.patch
RUN echo "- vtkjpeg vtkexpat vtkftgl vtkfreetype'''.split()" >> lib.patch
RUN echo "+ vtkmetaio'''.split()" >> lib.patch
RUN echo "" >> lib.patch
RUN echo " if platform=='Linux':" >> lib.patch
RUN echo " libs.append('pthread')" >> lib.patch
RUN patch wscript < lib.patch

RUN ./waf --prefix=$PWD \
--with-petsc-dir=/petsc-3.5.4 \
--with-petsc-arch=arch-linux2-c-opt \
--with-vtk-ver=vtk-5.8 \
--with-vtk-dir=/usr \
configure build install

# set the enviroment enviroments
ENV GENIUS_DIR /Genius-TCAD-Open
ENV LD_LIBRARY_PATH $LD_LIBRARY_PATH/:$GENIUS_DIR/lib:/usr/local/lib/
1 change: 1 addition & 0 deletions docker/bash.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker run -it genius-tcad /bin/bash
1 change: 1 addition & 0 deletions docker/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker build -t genius-tcad .